Hello - I am fairly new to VBA. I am trying to filter a form containing property addresses. I would like the user to be able to type in the first few letters of the address and the form to then filter to the matching records. I have placed the data below on the click event of a button, but its not working. Whats wrong.
Also is this the right approach - I have reads up alot and see that often "I THINK", people seem to use
Select *
FROM Address
Where etc..
Is that a better approach?
My current code below:
Private Sub Btn_Find_DblClick(Cancel As Integer)
Me.Form.Filter = "[Property_Address_1] like'*" & [USER TYPES IN START OF ADDRESS] & "*'"
Me.FilterOn = True
Me.OrderBy = "[Property_Address_1] ASC, [Property_Address_no] ASC"
Me.OrderByOn = True
End Sub
Thank you Mark
Also is this the right approach - I have reads up alot and see that often "I THINK", people seem to use
Select *
FROM Address
Where etc..
Is that a better approach?
My current code below:
Private Sub Btn_Find_DblClick(Cancel As Integer)
Me.Form.Filter = "[Property_Address_1] like'*" & [USER TYPES IN START OF ADDRESS] & "*'"
Me.FilterOn = True
Me.OrderBy = "[Property_Address_1] ASC, [Property_Address_no] ASC"
Me.OrderByOn = True
End Sub
Thank you Mark