Input form

A

AccessKay

Hi,
How complicated is it to create a form so the user can input things like
date range, dept, group, etc. and then have another form to pop up with the
data based on the inputs? What do I need to know to make this happen? I’ll
probably need to read more about forms and subforms but what is the general
process?
Thanks!
 
T

Tom van Stiphout

On Fri, 26 Mar 2010 06:38:01 -0700, AccessKay

You can certainly build a form to do this, but it is already built-in.
Check "Query by Form" menu option. You would run it on your main form
and it allows you to put in a complex filter over several fields.

If you have to write your own form: you could create a new form with
some textboxes and dropdowns as you indicated. Then have a button
"Open Main Form". In that button_click event concatenate a string
variable that will be the where-clause for the form. Something like:
strWhere = "myDateField between #" & Me.txtStartDate & "# and #" &
Me.txtEndDate & "#"
etc.
Then on the next line you open the form using DoCmd.OpenForm, and you
use this string in the WhereCondition argument.

-Tom.
Microsoft Access MVP
 
A

AccessKay

Fun! That’s really cool that Access has a built-in capability for this. I’m
going to play around with this and also try to learn how to write my own
form. I’d like to learn both ways. Thanks so much for giving me some good
direction.
 

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