Option group parameter queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Customizing Access parameter queries, how will I make a query works using an
with six controls? I am working with Access 2003. I am grateful for Martin
Green Office Tips from http://www.fontstuff.com/access/acctut08.htm and the
instruction works for my database. I have a start date, end date, category,
and department on a form and I can generate a query by entering information
in all or any of the control. Placing an Option Group on the form to give
the user more option provides no result or opens the form OK control VB
codes. I would like to select from all or any of the above controls that
currently working and further select from the option group or only select the
option control to provide the result.

Thank you,
 
I don't like to use any option groups. They:
1. Take up too much real estate.
2. Have to be manually updated when a new option is needed.
..02

Next, abandon the "parameter" query concept, once you get past more than,
say, one parameter.

Finally, I don't know what you output desires are(subform, report, etc), but
you can do a lot with VBA in regards to creating a query at runtime.

with controlname
if not isnull(.value) then
strW = strW & " Fieldname = " & .value
end if
end with

with controlname2
if not isnull(.value) then
if len(strW) > 0 then strW = strW & " AND " 'single line if
statement
strW = strW & " Fieldname = " & .value
end if
end with
 
MVP] S.Clark
Thank you very much for responding. I like to explore more about creating a
query at runtime. I only see the Expression Builder and no event procedure
in the properties. How will I start to write a VBA procedure for a query?
My final output is a report. Access is very addictive.
 

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

Back
Top