Hi all
I was wondering how to set a command button to search multiple fields on a single table of data for user entered data.
The database is for documents and provides links to relevant documents.
ie. Bob has a fall at work. He knows theres a slip trip fall checklist somewhere and not quite sure where. He opens up the Access database for document control and enters "slip trip fall" into the search text box.
He clicks a button
A new form loads with any form that has "Slip trip fall" in the either the [DocumentName] field or the [DocumentDescription] field.
i figure its a VBA thing and will be a variation on
Any ideas? am I thinking down the right track?
Cheers
Rey
I was wondering how to set a command button to search multiple fields on a single table of data for user entered data.
The database is for documents and provides links to relevant documents.
ie. Bob has a fall at work. He knows theres a slip trip fall checklist somewhere and not quite sure where. He opens up the Access database for document control and enters "slip trip fall" into the search text box.
He clicks a button
A new form loads with any form that has "Slip trip fall" in the either the [DocumentName] field or the [DocumentDescription] field.
i figure its a VBA thing and will be a variation on
Code:
Private Sub FindDoc_Click()
If Len(Me.SearchBox & "") <> 0 Then
DoCmd.OpenForm "SearchForm", , , "[DocumentName]= " & Me.SearchBox
End Sub
Any ideas? am I thinking down the right track?
Cheers
Rey