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

validating input

Status
Not open for further replies.

etcrier

Programmer
Sep 20, 2006
60
US
I am not sure if this is on FAQ as i could not find a subject line that matches.

I have a form to add records to a query called "jobs".
hte 1st field is a key "clientno" to a master table called "clients"

when they enter the clientno I want it to beep and reject the entry immediately if no matching clientno is in clients table.
I have a button to call the clinet add form.
the clients table is currently not part of the form. but I do a display of the client name if the entry matches. I added the client name to the input query for the "jobs".

this must be a simple thing to do but i am drawing a blank

thanks
 
you can use the noData event

with a msgbox so when it appears it will beep

Code:
Private Sub Report_NoData(Cancel As Integer)
    msgbox = "No matching data was found", vbCritical , "App Name"
End Sub

hope this is what you wanted

I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 

Why not use a combo box based on the values you want to allow. Set the Limit to List property to YES.


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top