Hi again,
I used to have seperate forms, each would have a basic search function that would allow the user to find a record.
We have now decided to include all of the forms on a single form using tabs and subforms.
The problem that I now face is that whenever I do a search on one of the forms, all of them are updated with random records.
Here's an example of my search code:
Private Sub Search_Click()
'Dim strSearch As String
'Performs the search using value entered into SearchBuildID
'and evaluates this against values in BuildingID
DoCmd.ShowAllRecords
Forms!frmMenu!frmRequests.SetFocus
DoCmd.GoToControl ("Account Number")
DoCmd.FindRecord Me!SearchID
Account_number.SetFocus
SearchID = Account_number.Text
SearchID.SetFocus
strSearch = SearchID.Text
End Sub
How can I have it that it will only return results on a single subform and not all of them?
I used to have seperate forms, each would have a basic search function that would allow the user to find a record.
We have now decided to include all of the forms on a single form using tabs and subforms.
The problem that I now face is that whenever I do a search on one of the forms, all of them are updated with random records.
Here's an example of my search code:
Private Sub Search_Click()
'Dim strSearch As String
'Performs the search using value entered into SearchBuildID
'and evaluates this against values in BuildingID
DoCmd.ShowAllRecords
Forms!frmMenu!frmRequests.SetFocus
DoCmd.GoToControl ("Account Number")
DoCmd.FindRecord Me!SearchID
Account_number.SetFocus
SearchID = Account_number.Text
SearchID.SetFocus
strSearch = SearchID.Text
End Sub
How can I have it that it will only return results on a single subform and not all of them?