combo box to update subforms?

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

Guest

Hi All

I have 2 tables that contain similar data but only 1 field that can be
linked by field Road_Num. Each Road_Num record has several entries in each
table and I need to display these on the same form for direct comparison.

I have set up queries to bring out only the data I need for each table and
then created 1 form with sub-formsfrom these queries. I have also put a combo
box on the form that allows the user to select the Road_Num field to compare.

I have done this years ago but I cannot get the combo box to update the 2
subforms. I seem to remember using the Afterupdate() event?

Any help would be gratefully received!

Cheers
 
Stu_Mc,
From what I can gather from your post... your RoadNo combo box on the
main form should be unbound, but show all possible roads. That combo would
be the Parent for each Child subform.
When RoadNo changes, using the AfterUpdate event, you just need to
ReQuery the two subforms.
--
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love, and you'll never work a day in your life."
 
Thanks Al

I have been away from Access for a couple of years and its taking me time to
get my head back around it!

The requerying the subforms works great - AFTER I remembered I hadn't put
the query condition on the subforms that it should equal the listbox.value
before requerying!

Thanks again!

Stu
 
Stu,
Well... the Parent/Child relationship (RoadNo combo of the main form to
the RoadNo of the subform records) should do that for you, without having to
indicate that realtionship within the subform query/s.
But, I'm sure that either method "should" work.
--
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love, and you'll never work a day in your life."
 

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