H
h2fcell
I seem to be running into a brick wall with this one.
Using Access 2007, I’m trying to create a drill down scenario.
I have a Datasheet form where I’ve set a fields “Display As Hyperlinkâ€
property to Screen Only.
The field is Text because it contains numbers that may have leading 0’s.
ex. 07093
I have assigned the below “On Click†event procedure to the field.
****************************************
Private Sub Zip5_Click()
Dim myFilter As String
myFilter = "[Zip5] = "" & [Zip5] & """
DoCmd.OpenForm "frmViewtblQry1", acViewPreview, , myFilter, acWindowNormal
End Sub
****************************************
The above code is setting my filter property to:
[Zip5] = " & [Zip5] & "
If I use:
myFilter = "[Zip5] = " & [Zip5]
I get:
[Zip5] = 07093
in the filter property and no data.
I need the myfilter to populate the filter property like:
[Zip5]="07093"
I’m turning gray trying all types of variations but I can’t seem to get it
right.
How do I set myfilter to give me quotes around the Zip5 I clicked on?
Thanks
Using Access 2007, I’m trying to create a drill down scenario.
I have a Datasheet form where I’ve set a fields “Display As Hyperlinkâ€
property to Screen Only.
The field is Text because it contains numbers that may have leading 0’s.
ex. 07093
I have assigned the below “On Click†event procedure to the field.
****************************************
Private Sub Zip5_Click()
Dim myFilter As String
myFilter = "[Zip5] = "" & [Zip5] & """
DoCmd.OpenForm "frmViewtblQry1", acViewPreview, , myFilter, acWindowNormal
End Sub
****************************************
The above code is setting my filter property to:
[Zip5] = " & [Zip5] & "
If I use:
myFilter = "[Zip5] = " & [Zip5]
I get:
[Zip5] = 07093
in the filter property and no data.
I need the myfilter to populate the filter property like:
[Zip5]="07093"
I’m turning gray trying all types of variations but I can’t seem to get it
right.
How do I set myfilter to give me quotes around the Zip5 I clicked on?
Thanks