Question: On a form I have the following SQL:
Select table.row FRom table;
And I would like
Select table.row FRom table WHERE( Bring up string from user input);
.
How do I do that?
I think you want a Parameter query. This can be done in two ways:
1. Using a prompt:
SELECT <field, field, field> FROM table WHERE [Fieldname] = [Please enter the
criterion:];
The text in square brackets will be shown on screen as a prompt.
2. Better, getting the criterion from an unbound control on a Form:
SELECT <field, field, field> FROM table WHERE [fieldname]=
[Forms]![NameOfYourForm]![NameOfYourControl];
A clearer question may well elicit a more detailed answer.
--
John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also
http://www.utteraccess.com