help with requery or refreshing criteria changes

C

Chad

Hello, I have a continious form named frmSuperlog thats control source is a
query named qryDailySuperlog. In the forms "Form Header" I have a date picker
with a text box named txtSuperlogDate that holds the date and I have a combo
box named cboSupervisor that gives me a list of supervisors names. These two
boxes are used to filter the query. In the cboSupervisor(s) afterUpdate I
have it run the query. My question is every time I choose a new name from my
combo box it changes the data in the continious form which is what I wanted
but when I change the date I have to reselect a name in the combo box for all
the information to change on the form. How can I fix this to where if I
change the date it runs the query and if I change the name in the combo box
it runs the query?


Thanks!
 
J

Jeff Boyce

Chad

It sounds like you already have an AfterUpdate routine that runs for your
combobox. You could either create one that runs (as AfterUpdate) for your
date-picker, or you could, in the date-picker's AfterUpdate event, call the
combobox's AfterUpdate, with something like (your controlnames will vary):
Call Me!YourComboBoxName_AfterUpdate()

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
C

Chad

Jeff, I think I have this form all messed up. Here is what I want to do. I
want to have a form that has a text box that would hold a date and a cbo box
that you could select a supervisors name from and when eather box is change
then it would change the data in the detail section of my form using a query.
do you know of any examples I could look at that does something similur?
Thanks!
 
J

Jeff Boyce

Chad

If the "data in the detail section" updates after selecting a new supervisor
in the combobox, that combobox probably has an "AfterUpdate" event that
tells the data source to either requery or refilter.

My suggestion was to add either a similar bit of code to the AfterUpdate of
your text box (date picker) or to add a Call statement to (re-)run the cbo's
AfterUpdate event.

What happens when you try those?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jeff Boyce

Post the code you are using in the text box's AfterUpdate event.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
C

Chad

Jeff, Access World Forums resolved it. It works with adding a requery to the
date pickers "Ok" button. Thats whats bad is I cant show nobody my issues in
this forum and sometimes its hard to understand what someone is talking about
because you dont see it. I always get a fast answer from this forum and
appreciate everyones responces to my questions the help is greatly
appreciated! Thanks!
 

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