Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to convert number to text on the fly

Status
Not open for further replies.

associates

IS-IT--Management
Aug 2, 2005
59
AU
Hi,

I have a quick question here. I have a form that has a listbox, combobox, and other buttons. In the listbox, there are 4 columns. The first column shows studentID then followed by name, and so on. I have a combobox that is designed to filter the listbox. Because the studentID in the student table is of type autonumber, I come into trouble when putting a wildcard like '*'. For example in the combobox that filters by studentID, i run into problem if i put in 10* to get all records that started with 10.

I know that i can just change the type of studentID from autonumber to text, but it'd take time. So is there any other way of getting around this issue?

Thank you in advance and look forward to hearing from you

 
Use the Cstr() and Clng() functions to convert your autonumbers to a string and back to a long integer.

Cheers,
Bill
 
How are ya associates . . .

Add a [blue]custom field[/blue] to the query used as the [blue]RowSource[/blue] of the [blue]Listbox[/blue] . . .
Code:
[blue]strID:CStr([studentID])[/blue]
. . . and ping against the custom field instead!

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top