Discussion Locked

Access 97 Question

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I created a NEW form. It has an unbound Text box #1 to be used for entry Social Security Number). It also has a text box # 2 for the results of the query (Name).

I create the query and in the criteria I reference Text box # 1.

I put a value inthe form (SSN). I check the query and it has used the value from text box # 1. BUT I cannot seem to get the results of the query (Name) back to the form in text box # 2?? Text Box # 2 on the form references the name field in the database.

Please explain what I am doing wrong?? And how do I do it correctly....
Thanks for your help!

5 replies

by glen_mcleod

Warning: A very quick answer with no research done...

"Refresh" the datasource of Text Box #2 once the SSN has been entered in Text Box #1.

Glen

by richtee

The above answer has the right idea. If you put the following code in the AfterUpdate event of Text1, your answer will be returned in Text2 after entry of the data in Text1 control.

Private Sub Text1_AfterUpdate()
DoCmd.Requery
End Sub

This discussion is closed to new replies.