David Ball
Registered User.
- Local time
- Today, 11:03
- Joined
- Aug 9, 2010
- Messages
- 230
Hi,
I have a report with a row for each “ISO” field, a text field that shows an isometric number. I have inserted a Command Button, that appears on each row, and want to be able to open a query and filter it with the filter to match the ISO number of the row that I selected the Command Button on.
The query also has a field called ISO. (Does it matter that the query and report have the same field name?).
I have been trying to set up code to open the query and filter it for the same ISO number on the report row that I selected.
How do I modify my code to get it working?
Private Sub Command16_Click()
DoCmd.OpenQuery "qryCOW_Punch_List-Dates", , acReadOnly
DoCmd.ApplyFilter , "[ISO] ='rptCOW_Punch_List-Dates.ISO.Value'"
End Sub
Thanks very much
Dave
I have a report with a row for each “ISO” field, a text field that shows an isometric number. I have inserted a Command Button, that appears on each row, and want to be able to open a query and filter it with the filter to match the ISO number of the row that I selected the Command Button on.
The query also has a field called ISO. (Does it matter that the query and report have the same field name?).
I have been trying to set up code to open the query and filter it for the same ISO number on the report row that I selected.
How do I modify my code to get it working?
Private Sub Command16_Click()
DoCmd.OpenQuery "qryCOW_Punch_List-Dates", , acReadOnly
DoCmd.ApplyFilter , "[ISO] ='rptCOW_Punch_List-Dates.ISO.Value'"
End Sub
Thanks very much
Dave