Tables :: Subscript / Superscript Characters In A Table
Nov 1, 2014
if it is possible to store text in a table that includes subscript / superscript characters. As an example; need to indicate the units of measurement for some data and therefore need to be able to pull data from the table such as the following: kg/m2, m/s2 etc. In both these case i need the 2 character to be superscript.
I'm trying to make this an automated process so pulling it directly from the database.o a method of storing the data as a text string would be ideal.Otherwise i imagine a rather difficult VBA function will be involved
I have created a database which needs to contain various items / formulas which are superscripted such as cm³, °C etc etc.
Now l can find some of what l need on the character map but in other instances what i need is not there.
I have been through the available toolbar buttons but cannot find how to superscript. I have even copied a superscripted formula out of Word but it reverts back to a none superscripted format.
Any ideas as this is seriously compromising my data base. :(
I uploaded quite a bit of data from an extensive list of Word Documents. In some of the Memo fields, it imported these weird Squares. Some times at Tabs or Paragraph returns.Is there an Easy way to remove these things?
I am taking a filing index of City Council Resolutions which is currently based in Excel and transferring the index to an Access database I am building. An issue I am having is that the Resolutions being indexed have a subject description that ranges from about 100 characters to +700. The new Access database must hold the complete contents of the Excel spreadsheet.
The direction I have taken is to divide up the subject field into three text fields as needed ([Subject1], [Subject2], [Subject3]) each with up to 255 characters. In reports I will simply combine these fields into one large text box so the user will see them as one large subject description. Memo fields are not an option because in the near future the database backend will be moved to SQL and I understand that SQL does not always play well with memo fields.
Is there any way of entering a mixture of subscript, superscript and normal characters in Access. I am trying to enter subscript numbers into a database of mineralogical formulae.
I'm attempting to upload an excel file into access table using the wizard however I get this error message "subscript out of range" Please Help! I've uploaded other files via excel and don't have this problem.
Ok I have the following code which keeps producing an Error # 9 : subscript out of range.....
Public Sub SaveLineItems() On Error GoTo SaveLineItem_Error MsgBox "I am doing the line items" Dim sSQL As String Dim iLine As Integer Dim iMaxLines As Integer Dim iMonthCount As Integer Dim iFieldCount As Integer Dim sThisField As String Dim sFieldPrefix As String Dim aFields, aMonths, sInDirectCostId, sFY, sUser sFY = [Forms]![SWITCHBOARD]![cboFY] sUser = [Forms]![SWITCHBOARD]![txtUser] sInDirectCostId = sFY & sUser aFields = Array("cboDesc", "txt", "txtMemo") aMonths = Array("OCT", "NOV", "DEC", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP") iMonthLoop = 0 iMonthCount = 11 iMaxLines = 16 iLine = 1 Do While iLine <= iMaxLines iMonthLoop = 0 If Me.Controls(aFields(0) & iLine) <> "" And Me.Controls(aFields(0) & iLine).Locked = True Then If Me.Controls(aFields(0) & iLine).Column(2) = -1 And Me.Controls(aFields(3) & iLine) = "" Then MsgBox "You must have a memo for the program : " & Me.Controls(aFields(0) & iLine), vbOKOnly, "Missing Information" Me.Controls(aFields(3) & iLine).SetFocus Exit Sub Else sSQL = "UPDATE BUDGET_INDIRECTCOSTS_R_LINEDETAILS SET " & _ "ProgramId = " & Me.Controls(aFields(0) & iLine) & ", " & _ "Memo = " & Me.Controls(aFields(2) & iLine) & ", " Do While iMonthLoop <= iMonthCount sSQL = sSQL & aMonths(iMonthLoop) & " = " & Me.Controls(aFields(1) & aMonths(iMonthLoop) & iLine) If iMonthLoop < iMonthCount Then sSQL = sSQL & ", " End If iMonthLoop = iMonthLoop + 1 Loop sSQL = sSQL & " WHERE INDIRECTCOSTID = " & sInDirectCostId & " AND ID " = iLine End If ElseIf Me.Controls(aFields(0) & iLine) <> "" Then If Me.Controls(aFields(0) & iLine).Column(2) = -1 And Me.Controls(aFields(3) & iLine) = "" Then MsgBox "You must have a memo for the program : " & Me.Controls(aFields(0) & iLine), vbOKOnly, "Missing Information" Me.Controls(aFields(3) & iLine).SetFocus Exit Sub Else sSQL = "INSERT INTO BUDGET_INDIRECTCOSTS_R_LINEDETAILS " & _ "(Id, ProgramId, Memo" Do While iMonthLoop <= iMonthCount sSQL = sSQL & ", " & aMonths(iMonthLoop) If iMonthLoop = iMonthCount Then sSQL = sSQL & ") VALUES (" End If iMonthLoop = iMonthLoop + 1 Loop iMonthLoop = 0 sSQL = sSQL & "" & iLine & ",'" & Me.Controls(aFields(0) & iLine) & "','" & Me.Controls(aFields(2) & iLine) & "'" Do While iMonthLoop <= iMonthCount sSQL = sSQL & ", " & Me.Controls(aFields(1) & aMonths(iMonthLoop) & iLine) If iMonthLoop = iMonthCount Then sSQL = sSQL & ")" End If iMonthLoop = iMonthLoop + 1 Loop End If End If MsgBox sSQL If Len(Trim(sSQL)) > 0 Then Set db = CurrentDb db.Execute sSQL End If iLine = iLine + 1 Loop SaveLineItem_Error: If Err.Number <> 0 Then MsgBox "Line Item Save Error : " & Err.Number & vbCrLf & Err.Description End If End Sub
I have gone through and commented everything out and brought back only parts and here is what I have when I get the error the first time....
Public Sub SaveLineItems() On Error GoTo SaveLineItem_Error MsgBox "I am doing the line items" Dim sSQL As String Dim iLine As Integer Dim iMaxLines As Integer Dim iMonthCount As Integer Dim iFieldCount As Integer Dim sThisField As String Dim sFieldPrefix As String Dim aFields, aMonths, sInDirectCostId, sFY, sUser sFY = [Forms]![SWITCHBOARD]![cboFY] sUser = [Forms]![SWITCHBOARD]![txtUser] sInDirectCostId = sFY & sUser aFields = Array("cboDesc", "txt", "txtMemo") aMonths = Array("OCT", "NOV", "DEC", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP") iMonthLoop = 0 iMonthCount = 11 iMaxLines = 16 iLine = 1 Do While iLine <= iMaxLines iMonthLoop = 0 If Me.Controls(aFields(0) & iLine) <> "" And Me.Controls(aFields(0) & iLine).Locked = True Then If Me.Controls(aFields(0) & iLine).Column(2) = -1 And Me.Controls(aFields(3) & iLine) = "" Then MsgBox "You must have a memo for the program : " & Me.Controls(aFields(0) & iLine), vbOKOnly, "Missing Information" End If ElseIf Me.Controls(aFields(0) & iLine) <> "" Then If Me.Controls(aFields(0) & iLine).Column(2) = -1 And Me.Controls(aFields(3) & iLine) = "" Then MsgBox "You must have a memo for the program : " & Me.Controls(aFields(0) & iLine), vbOKOnly, "Missing Information" End If End If iLine = iLine + 1 Loop SaveLineItem_Error: If Err.Number <> 0 Then MsgBox "Line Item Save Error : " & Err.Number & vbCrLf & Err.Description End If End Sub
I have gone and researched the problem and have not been able to find anything that relates to this......
The below code exports a table (via a function) to a spreadsheet and saves it in a defined location. the code then opens the file does some work with it then moves it(left the move bit out as it works fine)
so when i run the code it works absolutle fine, table is exported, work is done and file is moved. however if i run the code again it fails, i get the error message out of range. i was originally getting this error when using the .usedrange.copy so i commented this out and now i get it on the next line that tries to work with the file so obviously something is wrong in my logic.
Code: Private Sub Export2JDE_Click() Application.Run ("JDE_Export") 'Exports to an xlsx file in the location described in the function. Dim xlApp As excel.Application Set xlApp = CreateObject("Excel.Application") xlApp.Visible = True
When I try to import a sheet from Excel into an existing table I get a subscript out of range error.When I then import the sheet into a new table and then import it into the existing table I was trying above immediately afterwards it works fin.
I am trying to import data from Excel 2007 to Access 2007. However, after hitting the final button to submit the import I get this message: "Subscript out of range."
I have tracked down the fields that seem to be causing the problem. Below is a picture of the Design View for my table. The fields named Ht, College, Dob, State, and Country are the fields that give me the subscript message (I know this because I tried uploading different times with just one of these fields mixed in with the fields that would upload). My first guess for the Height was just a matter of the data type being wrong, but I changed the Ht column to text on my Excel spreadsheet and the same message occurs.
College: Is listed in the picture. This is being pulled from another table. I have another field labeled Transfer College that does this as well, but the expression is a bit different, and any data in a Transfer College column on excel will import over. I have tried altering the College data type to match the Transfer college, but I have to delete too many relationships and it screws up the record source for all of my forms and reports.
DoB: It has an input mask of: 99/99/0000;0;" " Not sure why this doesn't work. Access seems to be picky with dates. When going through the import steps it changes my dates in my spreadsheet to a 5 digit number.
State: Again, another combo box with a value list. State abbreviations are the record source. I would think this would upload. Should I just remove the combo box and value list for now, and then reset this after I transfer my data over?
Country: Another combo box, but this one is pulling its data from a table with countries listed.
I have a table which contains a nine digit number. How do I write a query to limit the restults to just the first two digits of that nine digit number?
Is there a font that comes installed by default in access(windows) that supports subscript? My subscript in access is showing up as a box. If I change it to a font that I have installed/purchased seperate from windows it gets displayed properly. The problem with this, is when it pulls this info displayed in that font to the website, it reverts it to a font that the user doesn't have installed and goes back to a box.
So need a default windows xp font installed in access/windows that supports subscript....
I have to import a field from Excell that contains more than 50 characters in the field.
I need the line to stop at the last complete word prior to 50 characters and start the next record in that field automaticly and continue to fill and wrap at the last complete word prior to 50 characters.
Would it be better to do this in another Office 2K program?
I have several thousand lines to type if this can't be automated. What a drag.
I have a table called tblSchemeCodes with the following field names:
Field Name Data Type Field Size Required Indexed
strCompany Text 1 Yes No strSchemeCode Text 3 Yes Yes(No Duplicates) strSchemeName Text 100 Yes No strOrigNo Text 9 Yes No strCategory Text 9 Yes No dtmDateAdded Date/Time No No
Here is an example of some of the scheme codes I have:
HG HGA HGB HGD HGF HGG HGJ HGP etc etc
however when I try to add HGE, it won't allow it, even though it doesn't exist within the table, it keeps changing it from HGE to HE, and HE already exists, so a can't add messgage pops up, which is should, because duplicates are not permiited.
I've tried turning off all of the required aspects and changed the "Yes (no Duplicates)" to "No", and the problem persists!!
Has anyone any idea why access would behave in this way and how I might resolve it.
Here is my problem. I need the number that is at the end of EBF, sometimes there will be a dash some times a space, i know that I can use RIGHT to remove the first 4 characters, however I do not know where to place that in the above code.
My second issue is once I have the number only showing in the field I want to link that answer to a table that has a description of what that number represents.
The table name is Approval_Code. I want to have it do a VLookup type of function however that is not available in access. So I need to know how to get that result in a new field.
Dim xlApp As New Excel.Application Dim xlwrkBk As Excel.Workbook Dim xlSheet As Excel.Worksheet Dim strXLS As String strXLS = "c:AccessMyfile.xls" Set xlwrkBk = xlApp.Workbooks.Open(strXLS)
[code]...
The program is stopping at " Set xlSheet = xlwrkBk.Worksheets("singles")"
and I am receiving the following error box:
Runtime error 9
Subscript out of range.
I don't understand this error because I am using the same program code with another Excel file in another module and it works perfectly.
I am trying to generate a report from a select query using the report wizard. The wizard is showing the error of subscript of out range. What is the reason and how can be rectified?
How to search an Access table for unwanted <cr> characters
Occasionally a stray carriage return <cr> Ascii 013 character finds its way into an Access table. These destroy the database when the table is processed by an outside utility for data cleansing.
To prevent this from happening, we have been told to clean the table before submitting it, i.e. remove all of the following:
carriage return, comma, double quotes, equals, greater than, smaller than
Is there any utility available which will remove all these characters when being run only once? (i.e. not find/replace which has to be started separately for each of these characters)
How do I search for a <cr>, even with find/replace?
I have a data base,one of the field contain Data like "ZZZ-DEFS#UUH1234567".
There should always be 19 characters in this field including #.I want to design a query which can sort out entries less than and more than 19 characters, so that wrong entries can be corrected .
My database has several tables (and queries) that have fields that contain people's names. Some names, like O'Neil, contain apostrophes. Other fields contain couple names, like Tom & Laura Jones. Both the ' and the & prevent queries, forms, and reports from working correctly.
I am having trouble checking if the last array value is equal to 'D'.
This is what i have so far but it keeps saying that 'subscript is out of range'... 'g' by the way is equal to 1. It just really means that there's only one value in ArrAC.
Trying to import data from Excel into an existing table in Access 2007. The import fails and keeps getting the error message: "subscript out of range". All of the column headings in the 1st row are exactly the same as the table in Access, and the data types are all text except for the key which is a number. I've imported to this table many times and not had a problem and can't figure this out.