Soundsmith
Programmer
I'm trying to use a global parameter as part of a SELECT query (qry1Claim)as the Recordsource for a form, which I typically call from another form via a command button.
In the Open event of the form, I have a test to verify there is a value set for theClaim (there is) but it does not appear to be seen by the form.
(global declaration in the main module)
Public theClaim AS Long
(the query, qry1Claim)
SELECT * from qryX WHERE [qryX].[claimNo]=[theClaim]
the Form's Recordsource is set to qry1Claim
If I click on qry1Claim, it asks for theClaim, then returns the correct data set, as I would expect.
If I open the form from my main form, a value for theClaim exists, and I would expect the query to execute-but it always asks for the value for theClaim again (it also asks every time I do a me.requery.) If I re-enter the claim no, the data displays.
I have tried this as a normal SELECT and also by setting the query to be a parameter query, but there is no difference.
What am I missing/doing wrong? David 'Dasher' Kempton
The Soundsmith
In the Open event of the form, I have a test to verify there is a value set for theClaim (there is) but it does not appear to be seen by the form.
(global declaration in the main module)
Public theClaim AS Long
(the query, qry1Claim)
SELECT * from qryX WHERE [qryX].[claimNo]=[theClaim]
the Form's Recordsource is set to qry1Claim
If I click on qry1Claim, it asks for theClaim, then returns the correct data set, as I would expect.
If I open the form from my main form, a value for theClaim exists, and I would expect the query to execute-but it always asks for the value for theClaim again (it also asks every time I do a me.requery.) If I re-enter the claim no, the data displays.
I have tried this as a normal SELECT and also by setting the query to be a parameter query, but there is no difference.
What am I missing/doing wrong? David 'Dasher' Kempton
The Soundsmith