Hi
I'm just wondering if it is possible to put an exact match filter on a IF Statemenet in a VBA Form. Basically i'm wanting to search for a postcode on a table using a txtbox on my form, i only want it to show an exact match and if it cant find it display an error message?
Currently I have the if statement below searching if the txtbox has something in:
If PCDESearch > 0 then
me.filter = "POST_CODE = '" & me.PCDEsearch & "' "
me.filteron = true
else
myinput = msgbox("Please Enter Postcode", vbCritical + vbOKonly, "" = vbOK
End if
then under the above I have another IF statement which i only want it to do if the above it true.
If liveservice = "LIVE" then
me!txtav = me!Availablitydate
else
me!txtav = me!Availablity_date
End if
Any suggesting???
I'm just wondering if it is possible to put an exact match filter on a IF Statemenet in a VBA Form. Basically i'm wanting to search for a postcode on a table using a txtbox on my form, i only want it to show an exact match and if it cant find it display an error message?
Currently I have the if statement below searching if the txtbox has something in:
If PCDESearch > 0 then
me.filter = "POST_CODE = '" & me.PCDEsearch & "' "
me.filteron = true
else
myinput = msgbox("Please Enter Postcode", vbCritical + vbOKonly, "" = vbOK
End if
then under the above I have another IF statement which i only want it to do if the above it true.
If liveservice = "LIVE" then
me!txtav = me!Availablitydate
else
me!txtav = me!Availablity_date
End if
Any suggesting???