Guys i need your help with this problem.

I want to check if a record in my database is available or not?

My database is stored in microsoft access file. ok.
I used the data control that comes in the default tool box and i set up the databasename property of the data control to the directry of the (.mdb) file. Then i tried to test the connection using simple SQL query. The main problem now is how to check if a record is in my database i tried this method
data1.Recordset.FindFirst "ColumnName=value). But this works only with values not with variables that means if i want to check if a user entered valid username for example in a text box how can pass this text as argument

I tried this statment but did not work it display error messagen

Data1.RecordSet.FindFirst "Column1=Text1.text"

Any help?

But Bro. The data Type of Column1 in my database is Long integer but Text1.text is String type no match!!!??

I tried to convert like this
Data1.Recordset.FindFirst "UserBadge='" & CLng(Text1.Text) & "'"

But i hade an Error No matching Type??

how to solve this?

This question has already been answered. Start a new discussion instead.