Hi,
I'm using OpenArgs to pass the selected date from a form with a calendar control to use in the query of the next opened form.
I've tested that the parameter has been passed correctly with the debugger. The code in this second form recieving the paramater is:
Private Sub Form_Open(Cancel As Integer)
holding = Me.OpenArgs
End Sub
Now, if the form just displays 'holding' as a testbox, then all is fine, however, I'm trying to use 'holding' as a condition of the control source for the record set being displayed. Eg:
SELECT * FROM Pledges_Date
WHERE ((holding)=[Pledges_Date].[pledgedate])
;
But this always results in a dialog box promting for "holding". This entered value is then used for the data selection criteria but the data passed via OpenArgs is the one still displayed in the textbox.
Any ideas on what I'm doing wrong?
Thanks
I'm using OpenArgs to pass the selected date from a form with a calendar control to use in the query of the next opened form.
I've tested that the parameter has been passed correctly with the debugger. The code in this second form recieving the paramater is:
Private Sub Form_Open(Cancel As Integer)
holding = Me.OpenArgs
End Sub
Now, if the form just displays 'holding' as a testbox, then all is fine, however, I'm trying to use 'holding' as a condition of the control source for the record set being displayed. Eg:
SELECT * FROM Pledges_Date
WHERE ((holding)=[Pledges_Date].[pledgedate])
;
But this always results in a dialog box promting for "holding". This entered value is then used for the data selection criteria but the data passed via OpenArgs is the one still displayed in the textbox.
Any ideas on what I'm doing wrong?
Thanks