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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cint

Status
Not open for further replies.

Dina01

Programmer
Mar 26, 2002
204
0
0
CA
Hello ,

I have the following code in my form
_________________________________________

.FindFirst "Rang = " & "'" & txtKey.Text & "'"

_______________________________________________

I need to convert the resutl into a number since in my table the data type is an interger...

I tried using Cint but I wasn't user where to enter it...
Can anyone please help

Thanks

 
This doesn't make sense here. The .FindFirst criteria statement just finds the record in your recordset. After that all of the data in the recordset record is available for use. If the data in the table is a number then you don't have to return it any other way that as itself. Actually, which field to you want to return? Result?

Maybe what you mean is the form test field needs to be converted to an Integer to perform the lookup. We can do that with the following:
FindFirst "Rang = " & CInt(Me![txtKey])

Now the control txtKey value is converted to an integer and can be used in the expression to locate the record with a number value of the datafield Rang.

Post back with more info if this is not helpful.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Thank You Bob

That's exactly what I was looking for.....

Thanks
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top