I have declared 'db;ProgID' as a public variable in a module
I have a form with a combo box in which I choose a particular
programme and the value gets stored as dblProgID. I know this part
works correctly, because MsgBox(dblProgID) at this point displays the
correct value.
I then open a report for which the following query (saved query) is
the record source.
SELECT Programmes.*
FROM Programmes
WHERE (((Programmes.ProgID)=[dblProgID]));
But the query does not take the already set value of 'dblProgID'.
Instead, it pops up the parameter input box asking for dblProgID. Why?
I have solved my problem by building a SQL string concatenating the
value of dblProgID into it. But I would still like to know why this
happens
Sunil Korah