Parameter Query Linked to a Form

C

channell

I have a question that maybe can be easily answered. If VBA Coding is
required, please help me with this, as I am new to VBA and I am just starting
to learn it.

I have a form, that when opened, a parameter box appears asking for a date.
When I enter the desired date, all the records (Employees) pertaining to the
date show up on the form for editing in Contunuous Form View. I am ok with
this, but I want to know if there is a better way to do this.

I simply want to open the form and have an unbound text box at top where I
can enter the desired date. I want an "OK" button next to it so when I click
it, an event is run to only pull up those records on the form that pertain to
the date entered.

Is this possible, and how would I do this? Thank you very much!
 
J

Jeff Boyce

One way to do this would be to have the query that "feeds" your form refer
to the unbound textbox as a parameter something like:)

Forms!YourFormName!YourTextboxControlName

Then, in the <OK> button's Click event, you could use:

Me.Requery

to have the form requery itself, using the query that uses the textbox
control.

Good luck!

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
C

channell

Works Like a Dream!!! Thank you so so so very much! I have another question
too... if you could help me with it that would be awesome!

On the same form, after I put in the date, about 50 records or so will show
up. Now, I want to put in a combo box based on one of the fields in the
records, and I want to be able to select a value in the cmb box that will
filter and only display those records within that date. If you could assist
me, that would be awesome!

-Scott Channell
 
J

Jeff Boyce

Scott

You're better off posting your new question as a new post. If you leave it
"down-thread" here, fewer eyes/brains will consider it.

(I'm not clear on something ... I thought entering the date ALREADY limited
the records to a specific date. Are you talking about a different date
field?)

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 

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