B
bmullin via AccessMonster.com
Hi,
I have a list type form that shows a list of borrowers. The list form can be
narrowed down based on a full or partial borrower ID number and a full or
partial SSN.
I have paramaters on Borrower ID and SSN as follows:
Like "*" & [Enter as much of Borrower Id as Possible] & "*"
Like "*" & [Enter as much of Social Security# as Possible] & "*"
The user only has to enter one or the other, but can enter both.
The form requeries using a lookup button with the following code behind it:
Private Sub Find_Record_Click()
On Error GoTo Err_Find_Record_Click
Screen.PreviousControl.SetFocus
DoCmd.Requery
Exit_Find_Record_Click:
Exit Sub
Err_Find_Record_Click:
MsgBox Err.Description
Resume Exit_Find_Record_Click
End Sub
Then, they can connect to a main form with more thorough data. It works
great... except if the user presses cancel when they're prompted to enter a
number. If they hit cancel, the next time they press the search button, they
get an error saying that the recordsource, which is 5 fields from the
underlying table, does not exist.
Any thoughts would be appreciated.
Thanks
I have a list type form that shows a list of borrowers. The list form can be
narrowed down based on a full or partial borrower ID number and a full or
partial SSN.
I have paramaters on Borrower ID and SSN as follows:
Like "*" & [Enter as much of Borrower Id as Possible] & "*"
Like "*" & [Enter as much of Social Security# as Possible] & "*"
The user only has to enter one or the other, but can enter both.
The form requeries using a lookup button with the following code behind it:
Private Sub Find_Record_Click()
On Error GoTo Err_Find_Record_Click
Screen.PreviousControl.SetFocus
DoCmd.Requery
Exit_Find_Record_Click:
Exit Sub
Err_Find_Record_Click:
MsgBox Err.Description
Resume Exit_Find_Record_Click
End Sub
Then, they can connect to a main form with more thorough data. It works
great... except if the user presses cancel when they're prompted to enter a
number. If they hit cancel, the next time they press the search button, they
get an error saying that the recordsource, which is 5 fields from the
underlying table, does not exist.
Any thoughts would be appreciated.
Thanks