Where are you using this query? For a form, or a report?
If a report, check whether you've got a reference to the incorrect name,
especially in the Sorting and Grouping dialog, or as a value in a header.
There are fewer places to check with a form, but you could perhaps have a
reference to the name in a filter, or in a bound control.
To help, you could try using the undocumented "ExportToText" method:
Application.SaveAsText [acForm or acReport], "Name of Form or Report",
"Full
path to text file"
and then do a search in that text file. I talk about using this method in
my
February, 2005 "Access Answers" column in Pinnacle Publication's "Smart
Access". You can download the column (and sample database) for free at
http://www.accessmvp.com/DJSteele/SmartAccess.html
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
DV said:
OK, so I confirmed the main form name and the subform control, and
updated
the query accordingly. Still not getting the value. Any other
thoughts?
:
You can see the name of the form in the Database window. You can also put
code (say, in its Open event) to display the name. Something like
MsgBox
Me.Name
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
As far I i can tell, the mainform name is correct. How can I
verify,
"name"
doesn't appear when I diplay the mainform properties.
:
You sure about what you posted earlier then? Sounds as though
your query
is
looking for a form named Research Database Users, not frm
Research
Database
Users as you posted before.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Ok, I corrected the container name to read "frm Research
Database
Subform",
but I'm still being prompted for a parameter value. The
message
reads -
Frms!Research Database Users!frm
:
Are you sure that the subform container on frm Research
Database
Users
(the
control that frm Research Database Subform is in) is named
frm
Research
Database Subform? If it's not, that's the name that you want there.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Here's is my exact syntax for the query criteria with the
respective
mainform and subform names, and "SYSTEM" as the field name:
[Forms]![frm Research Database Users]![frm Research
Database
Subform].[Form]![SYSTEM]
It returns a pop-up to enter the parameter value.