Naming a query

S

sheena

hi

i have created a query but for some reason no matter what i name it even
"query 1" access seems to bring up an error message saying " query1 is not a
valid name. Make sure that it does not include invalid characters or
punctuation and that it is not too long"

i've never had this problem before.

And just one other thing does anyone know when creating a query how to add a
drop down box so that users can only select from the options rather than
typing in the result for the query.

Thank you
Sheena
 
S

sheena

ok so i have managed to work out why access wasnt allowing me to name the
query it happens that my query was
Select*
from Data_Capture
where (Field_Name)=[please enter either 1. processed or 4. fruad];

It appears that the system did not like the dots after the 1 and 4 and
therefore would not allow naming of the query.

However i do still have the task of doing a drop down box instead of
manually entering the data required from the query.

Sheena
 
J

John Spencer

Check out this article for a detailed discussion.
http://www.fontstuff.com/access/acctut08.htm

Or check out this from MS
http://office.microsoft.com/en-us/access/HA011730581033.aspx

Or for another example
http://allenbrowne.com/ser-62.html


A brief quote from a John Vinson (Access MVP) posting.

You'll need to create a small unbound Form (let's call it frmCriteria) with
a Combo Box control (cboCrit) on it. Use the combo box wizard to select the
table for the selections, and be
sure that the bound field of the combo is the value you want to use as a
criterion. Save this form.

Now use

=[Forms]![frmCriteria]![cboCrit]

as the criterion in your Query.

It's convenient to base a second Form or Report on the resulting query to
display the results; if you put a button on frmCriteria to launch that form
or report, the user can enter the criterion and view the results in one
simple operation!

End quote


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

sheena said:
ok so i have managed to work out why access wasnt allowing me to name the
query it happens that my query was
Select*
from Data_Capture
where (Field_Name)=[please enter either 1. processed or 4. fruad];

It appears that the system did not like the dots after the 1 and 4 and
therefore would not allow naming of the query.

However i do still have the task of doing a drop down box instead of
manually entering the data required from the query.

Sheena

sheena said:
hi

i have created a query but for some reason no matter what i name it even
"query 1" access seems to bring up an error message saying " query1 is
not a
valid name. Make sure that it does not include invalid characters or
punctuation and that it is not too long"

i've never had this problem before.

And just one other thing does anyone know when creating a query how to
add a
drop down box so that users can only select from the options rather than
typing in the result for the query.

Thank you
Sheena
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top