Parameter Query Question

P

PA

I have created a series of Parameter Queries in a db (Access 2003), using the
square brackets [ ] to fill - in a Criteria. How can I specify the maximum
number of characters allowed in the fill-in box, for example we have state as
two characters, MD, PA, Ca in the tables and wish to limit the characters in
the fill-in box to match the field size.

Thanks
Paul
 
C

Conan Kelly

PA,

You can't.

Your only option for that (and a much better way to go) is to create a form.
Put a textbox on the form. Set the appropriat properties on the form to
limit the number of characters. I would also put a button on your form that
will run/open your query. Then change the criteria in your query to point
to the form instead of asking for input. You would do that by changing your
parameter [prompt text that was entered] to [Forms]![FormName].[TextBoxName]
(I think that syntax is correct...I can never remember the placementes of
the !'s and .'s...this would need to be verified if you want to use this
method). You don't need to put a button on the form to run the query but it
helps. Although the form does need to be open when the query is run/opened.
You can program the button to hide the form so it is not in front of your
data,

Another option would be to put a list/combo box on your form and have its
source be a table/query of all possible values (or type in all possible
values into the appropriate properties). Then it is just a matter of
selecting the option you want from the list and clicking the button to run
the query.

HTH,

Conan
 
D

Duane Hookom

http://www.tek-tips.com/faqs.cfm?fid=6763
--
Duane Hookom
Microsoft Access MVP


Conan Kelly said:
PA,

You can't.

Your only option for that (and a much better way to go) is to create a form.
Put a textbox on the form. Set the appropriat properties on the form to
limit the number of characters. I would also put a button on your form that
will run/open your query. Then change the criteria in your query to point
to the form instead of asking for input. You would do that by changing your
parameter [prompt text that was entered] to [Forms]![FormName].[TextBoxName]
(I think that syntax is correct...I can never remember the placementes of
the !'s and .'s...this would need to be verified if you want to use this
method). You don't need to put a button on the form to run the query but it
helps. Although the form does need to be open when the query is run/opened.
You can program the button to hide the form so it is not in front of your
data,

Another option would be to put a list/combo box on your form and have its
source be a table/query of all possible values (or type in all possible
values into the appropriate properties). Then it is just a matter of
selecting the option you want from the list and clicking the button to run
the query.

HTH,

Conan




PA said:
I have created a series of Parameter Queries in a db (Access 2003), using
the
square brackets [ ] to fill - in a Criteria. How can I specify the
maximum
number of characters allowed in the fill-in box, for example we have state
as
two characters, MD, PA, Ca in the tables and wish to limit the characters
in
the fill-in box to match the field size.

Thanks
Paul
 
C

Conan Kelly

Ahhh....

Grassy-ass, Seen-yor Hookom



Duane Hookom said:
http://www.tek-tips.com/faqs.cfm?fid=6763
--
Duane Hookom
Microsoft Access MVP


Conan Kelly said:
PA,

You can't.

Your only option for that (and a much better way to go) is to create a
form.
Put a textbox on the form. Set the appropriat properties on the form to
limit the number of characters. I would also put a button on your form
that
will run/open your query. Then change the criteria in your query to
point
to the form instead of asking for input. You would do that by changing
your
parameter [prompt text that was entered] to
[Forms]![FormName].[TextBoxName]
(I think that syntax is correct...I can never remember the placementes of
the !'s and .'s...this would need to be verified if you want to use this
method). You don't need to put a button on the form to run the query but
it
helps. Although the form does need to be open when the query is
run/opened.
You can program the button to hide the form so it is not in front of your
data,

Another option would be to put a list/combo box on your form and have its
source be a table/query of all possible values (or type in all possible
values into the appropriate properties). Then it is just a matter of
selecting the option you want from the list and clicking the button to
run
the query.

HTH,

Conan




PA said:
I have created a series of Parameter Queries in a db (Access 2003),
using
the
square brackets [ ] to fill - in a Criteria. How can I specify the
maximum
number of characters allowed in the fill-in box, for example we have
state
as
two characters, MD, PA, Ca in the tables and wish to limit the
characters
in
the fill-in box to match the field size.

Thanks
Paul
 
P

PA

Ahhh....

Grassy-ass, Seen-yor Hookom y Seen-yor Kelly


Conan Kelly said:
Ahhh....

Grassy-ass, Seen-yor Hookom



Duane Hookom said:
http://www.tek-tips.com/faqs.cfm?fid=6763
--
Duane Hookom
Microsoft Access MVP


Conan Kelly said:
PA,

You can't.

Your only option for that (and a much better way to go) is to create a
form.
Put a textbox on the form. Set the appropriat properties on the form to
limit the number of characters. I would also put a button on your form
that
will run/open your query. Then change the criteria in your query to
point
to the form instead of asking for input. You would do that by changing
your
parameter [prompt text that was entered] to
[Forms]![FormName].[TextBoxName]
(I think that syntax is correct...I can never remember the placementes of
the !'s and .'s...this would need to be verified if you want to use this
method). You don't need to put a button on the form to run the query but
it
helps. Although the form does need to be open when the query is
run/opened.
You can program the button to hide the form so it is not in front of your
data,

Another option would be to put a list/combo box on your form and have its
source be a table/query of all possible values (or type in all possible
values into the appropriate properties). Then it is just a matter of
selecting the option you want from the list and clicking the button to
run
the query.

HTH,

Conan




I have created a series of Parameter Queries in a db (Access 2003),
using
the
square brackets [ ] to fill - in a Criteria. How can I specify the
maximum
number of characters allowed in the fill-in box, for example we have
state
as
two characters, MD, PA, Ca in the tables and wish to limit the
characters
in
the fill-in box to match the field size.

Thanks
Paul
 
C

Conan Kelly

Da nada.

Glad to help.


PA said:
Ahhh....

Grassy-ass, Seen-yor Hookom y Seen-yor Kelly


Conan Kelly said:
Ahhh....

Grassy-ass, Seen-yor Hookom



Duane Hookom said:
http://www.tek-tips.com/faqs.cfm?fid=6763
--
Duane Hookom
Microsoft Access MVP


:

PA,

You can't.

Your only option for that (and a much better way to go) is to create a
form.
Put a textbox on the form. Set the appropriat properties on the form
to
limit the number of characters. I would also put a button on your
form
that
will run/open your query. Then change the criteria in your query to
point
to the form instead of asking for input. You would do that by
changing
your
parameter [prompt text that was entered] to
[Forms]![FormName].[TextBoxName]
(I think that syntax is correct...I can never remember the placementes
of
the !'s and .'s...this would need to be verified if you want to use
this
method). You don't need to put a button on the form to run the query
but
it
helps. Although the form does need to be open when the query is
run/opened.
You can program the button to hide the form so it is not in front of
your
data,

Another option would be to put a list/combo box on your form and have
its
source be a table/query of all possible values (or type in all
possible
values into the appropriate properties). Then it is just a matter of
selecting the option you want from the list and clicking the button to
run
the query.

HTH,

Conan




I have created a series of Parameter Queries in a db (Access 2003),
using
the
square brackets [ ] to fill - in a Criteria. How can I specify
the
maximum
number of characters allowed in the fill-in box, for example we have
state
as
two characters, MD, PA, Ca in the tables and wish to limit the
characters
in
the fill-in box to match the field size.

Thanks
Paul
 

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