Form with subform(query) based on combobox

E

etter34

Hello,

I've tried searching for this, but have not had any luck. I'm
relatively new to Access, and this is just getting away from me. Any
help would be greatly appreciated..

I've got a form set up that has a calendar and a combobox that is
populated upon clicking a date in the calendar. What I've tried to set
up is a subform below the calendar that uses the date from the combobox
above it to find all records (in the query) with that particular date
and display pertinent info.

I can get it to work, but it does not update dynamically. For
instance, if I click on 5/5/2006 it pops into the combobox, but the
subform query won't show up until I go into form design, and then back
to form view. How does one go about having the subform query update
automatically when the combobox is changed?

Thanks!

My form name is frmdateqry, and subform is frmdateqrysubform (kinda
confusing I know) - and combo box name is cbodatein.
 
K

kingston via AccessMonster.com

Use the calendar control's AfterUpdate event to do something like:

Me.SubFormControlName.Requery
 
E

etter34

Thanks for the fast response-

I am not sure how to roll with that. When I input that code and into
the calendar's afterupdate field I add it like:

Private Sub Calendar2_AfterUpdate()
Me.frmdateqrysubform.Requery
End Sub

But that doesn't work, so I don't know what subformcontrol name is
then..

Appreciate the help!
 

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