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

VBA lookup code for a form

Status
Not open for further replies.

DGK101

Programmer
Jan 9, 2003
33
ZA
Hi all,

I need help on some VBA for Access??

I have a access form that allows someone to enter names of people into the DB..

What i need a solution for is:

The user will enter info of an individual, starting off with a telephone number. what i
would like to do is have an event in for the Telephone field(on exit event) whereby it
runs a query and displays (if a telephone number exists in the DB) a message box stating that the telephone number already exists in the Database and that the person can view the corresponding record - to see if it is the same individual been entered in.

Any help or sample code would be highly appreciated!!!

Thanks
D
 
Take a look at the DLookUp function
or at the Findxxx methods of a recordset object and at the RecordsetClone property of your form.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Sorry i am quite clueless when it comes to this, but how would i go about using one of those functions exactly??

D
 
No F1 key on your keyboard ?
Feel free to do keyword searches on this forum.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top