I have a text field in a table that contains an alphanumeric code. i.e.
DEL998 DEL999 DEL1000 DEL1001 SUN998 SUN999 SUN1000 SUN1001 SUN1002 etc.
I want to run a query to find the highest number for a particular alpha code. In the example for DEL I would want the query to return DEL1001.
I have created a select query that asks for the alpha code, selects all codes starting with that code, sorts them in decending order and only displays the first record.
The problem is that because the field is a text field the numeric is not sorted like a number. So in the DEL case the query returns DEL999.
I have a several fields on my form that are list boxes that must have text as the properties so I can populate the lookup data with things like" Severe rating = 7 points" and "Moderate rating = 3 points". I have another similar field where the choices are "High probability = 9 points" and "Low probability = 2 points" etc. A third field needs to show the total points (product) of the choices from the first two fields, i.e. 9 points x 2 points = 18 points. Then, a fourth field needs to display where the answer falls in a grid, i.e. 1-14 points = Low, 15-29 points = medium, 30-49 points = high, etc.
How do I apply the calculations on the field choices if the field properties have to be text instead of number?
Lets say I have table with one of the field header as 'notes'. The notes is of type 'text'
In the notes column information like the following is typed out
Record 1 - MAX O.D 3.456" Min ID 1.2 and OAL 3.4"
or
Record 2 - MAX O/D 5.456" Min I.D 1.2" and Min Length 4.4 inches
Please note that as shown in the example there is no standard way of entering data. The only order that is followed is that the first numerical value corresponds to OD, 2nd corresponds to ID and 3rd corresponds to overall length.
I want to pull out the first numerical value (3.456 - first example, 5.456 -second example) and the last numerical value (3.4 -first example and 4.4 in second example). How would I be able to do this.
So the end result should be 2 more columns with max od as one and min length as the other. Regards George
I have a field in a query that contains numbers and text (text field). The numbers displayed come from a percent calculation and display with many decimals ie, .99898745987245. Is there a way to eliminate the decimals with code in the query field? For example .99898745987245 to equal 99%? I can’t format the field as a number or percent because it has both text and numbers. HELP!! Thanks
I have a field that is text format. However many of the records in that field contain numbers.I want to delete all the records that are numbers in this text field, leaving only records with textual data.
I was wondering if there is a way of only allowing text in a text field - we need to do this for validation purposes when inporting a text file into a database. I have tried input mask but this only checks when entering new data - I have tried to use validation rule like"???????" however this means that there has to be 7 letters in each field and this is not the case. - the field is for town and a couple of the records in this field have numbers at the end which are incorrect that we want the database to reject :eek:
I know you can't store text in a numeric field but I always thought you could store numbers in a text field - provided you didn't need to do any calculations on them. My problem is as follows:
I receive an Excel 2003 spreadsheet once a month, which I save to a specific filename/location overwriting the previous file. My Access 2003 database uses this as a linked table and (among other things) runs an append query to add the new data onto an existing table.
We have now added a new column called Reference in the spreadsheet. Often, this will be empty, but it could contain numbers or text. This is the first month I have received it and most entries are blank (including the first row) but further down there are some numeric values.
So I added a new Reference field to my main table and set it to text. Then I amended the append query to include the new field. But when I run it I get the error "Numeric field overflow". If I take that column back out of the query, it runs fine, so that's definitely the offending data. And when I open the linked table in Excel and scroll down to where I should see the reference numbers, I see #Num! So it looks to me like it doesn't recognise numbers as text.
Things I've already tried
In Excel, I formatted all the Reference cells as text.
That didn't work, so next I added a dummy record at the top of the Excel file (just under the headings), with zeroes in the numeric columns and 'X's in the text columns including Reference.
But that doesn't work either. Given the above circumstances, what's the best way to proceed with this?
I have 4 fields that are unbound on a form. img1 img2 img3 img4..When these are entered they are all combined and autofill another unbound textbox = imagename.. what i would like to do is from this unbound textbox 'imagename' ..i would like to populate a textbox that IS bound called FileName
[Event Procedure] Private Sub imagename_Click() Me.imagename = Me.FileName End Sub
I am trying to create a query to find missing sequential numbers in a text field. I am using this specific field as a case number which is designated as two letters, the # sign, two digits indicating the year, a dash, and then a four digit number; For Example: AB#13-1234.
The reason for this query is to tell the user of this database that a specific case number has yet to be entered and needs to be. The case numbers are unique and will never be referenced more than once.
My table name is "MainDataTbl" and the field i'm trying to find the missing case numbers is titled "CaseNumber".
Ok so in excel I have some numbers that are stored as text. The reason being that they are zip codes and some begin with 0 and excel doesn't want numbers to start with 0....so when I import these into an access field that has an input mask for zip codes...will it convert these correctly since the field is a text with input mask?
I have a text box called tboWorkstream on a form. I can scroll through the records using the navigation bar at the bottom. However, I want the records to be sorted by the Workstream Column, not the Workstream ID column (which is the primary key.)
Is there a way to do this?
I know you can list the way you want in a combo, but not sure how you do this in a bound textbox.
We need to move rich text from an Access memo field to a Word text box. So far the best Ive been able to come up with is in the code below. In this code pprs!What is a record set field of a table memo field that is bound to a text box enabled for rich text. The rich text seems to be stored as html as so I can get word to convert it by enclosing it in html tags.
Dim What As Word.Shape Set What = doc.Shapes.AddTextbox(msoTextOrientationHorizontal , doc.PageSetup.LeftMargin, 225, 534, 0) Dim sPath As String sPath = "G:Temp.html" Open sPath For Output As 1 Print #1, "<HTML>" & pprs!What & " </HTML>" Close #1 What.TextFrame.TextRange.InsertFile (sPath)
I have a single field in a table called "Client Contact", where users enter a semicolon between the name, address, and city state & zip. My reason for this was so we could copy client info with a single copy and paste (like from an email). But, on the final report, it needs to have these three parts split up into different lines, or even different textboxes. I can't find a way to do that.
I have a Form Display Data in my Access Database, which is working really well. However, users was asking if there is a way we can make Font Color Could/would change if The text in A field or Any field in my display form contained the word "SAD or MAD". Is there code for such thing in display form?..
I'm trying to pull a date from a table into a text box on a form tab control using DLookup and I just can't figure out what is wrong with my DLookup expression:
=DLookUp("DateOrdered","tDateOrdered","PrNumber=" & [PrNumber]) ----- (DateOrdered is short date, PrNumber is text, db is split Access 2013)
Whats missing in this expression? I've tried every criteria variant I could find but to no avail.
Hello, I have a Field in a Table called Fund Codes and they are entered as text: 1, 2, 3, 4 all the way to 1000. Now i need to find away to change 1 to 001, 2 to 002, 3 to 003, 10 to 010, but leave 100 as 100 and 222 as 222, so only add 0s to numbers from 1 to 99. Is there a way to do it? I know i can change the text to numbers and use format to do that, but i need to leave it as text. Please help. Many thanks!
HI, I have a field that contains mainly numbers, but the data type is set to Text because there are a few records where the numbers have a letter suffix.
Eg. Invoice numbers 100, 101, 102, 102A, 103 etc.
These suffixes are a result of poor data entry when the data was stored in Excel.
What I was to be able to do is sort this field and treat all entities as numbers. Currently when I sort it, it shows:
1 10 11 2 20 21 3 ...etc
Is this possible, even though the data type is Text?
I am wondering if there is a way to automate the pasting function of text from one field into several others in a table without losing the data that is already in the field.
As an example: in 20 fields I have "I love potatoes" and I want to paste the text string, "And I love tomatoes too" in every field without overwriting the original text.
I am trying to get information from webpage. [URL] ....
I am using the code: Set ie = CreateObject("internetexplorer.application") ie.Visible = True ie.Navigate "http://benwerd.com/lab/geo.php" While ie.Busy DoEvents Wend
Here is the info I can't get from the page. Can't find the id or element that hold the information, latitude, longitude ... that is listed in the website.
Hi *,OK, still new to Access so I apologize in advance if that is a dumb question ;)I have a table "survey" where I wanna store number values (0,25,50,75,100 respectively). The user is supposed to use a form to input the data into the table. For this purpose, he/she is supposed to use a drop down box.So, is it possible that the drop down box does not show the values but instead a verbal description of these values (very important, important, average, etc.)? What I have tried was to create a table with the number values and use this table as data source for the drop down box... it shows the values but for the end user, verbal descriptions would be better...Thanks!Steve
I am trying to import a field into a data, which is either a number, a number and text or just text. Within Excel the format has been set to text. The data type for the field in Access has been set to text and yet for those records which are only numbers when imported the record is shown as a number in scientific format. Does anyone have any ideas how I can get the number to be a number in its full format?