G
Guest
I need a form to search my database by postcode. I have a small form linked
by macro to my main form with three objects. Text Box (labelled TypeLabel),
Field to enter postcode (labelled txtPC) and the Search button (labelled
cmdSearch).
Now On Click i need the code to search current records of the database in
the postcode field (Postcode).
So far I have
Private Sub cmdSearch_Click()
Sub FindRecord(FindWhat, [Match As txtPC], [MatchCase], [Search As
AcSearchDirection = acSearchAll], [SearchAsFormatted], [OnlyCurrentField As
AcFindField = Postcode], [FindFirst])
End Sub
I know there is something wrong in there because VB keeps highlighting in
red the [Match as txtPC] section. What can I do?
by macro to my main form with three objects. Text Box (labelled TypeLabel),
Field to enter postcode (labelled txtPC) and the Search button (labelled
cmdSearch).
Now On Click i need the code to search current records of the database in
the postcode field (Postcode).
So far I have
Private Sub cmdSearch_Click()
Sub FindRecord(FindWhat, [Match As txtPC], [MatchCase], [Search As
AcSearchDirection = acSearchAll], [SearchAsFormatted], [OnlyCurrentField As
AcFindField = Postcode], [FindFirst])
End Sub
I know there is something wrong in there because VB keeps highlighting in
red the [Match as txtPC] section. What can I do?