
HI I am Looking for some help here...
1- I have a table that has a Postal code field.
2- a Query getting data from the table to a form.
3- a textbox in the form that the Onclick event is set to run the query based on the value I enter in an input box triggerd by the on click event code below.
Private Sub BDM_Click()
Dim intPostal As Variant
intPostal = InputBox("Please Enter Postal Code")
txtPostal = intPostal
DoCmd.OpenQuery "QryAvgIncome"
End Sub
Of course the qry is getting the inputbox value from the text box txtPostal
4- Canadian postal codes are always in this format L1L 1L1.
5- my problem is I am trying to enter a partial entry in the input box (i.e. L1L) and ask the query to return all matching results. I tried using the Like* in the query but again it didnt work, I belive the reason is that the field is built based on the input from the form.
Guys anyone knows how to overcome this problem?
thank you all
P.S. I am using Access 2003