Limit combo box entries in a subform Access 97

  • Thread starter Thread starter Brian Snelling
  • Start date Start date
B

Brian Snelling

Hi,
I am attempting to limit the contents of a combo box in a subform based
on the selection made in a combo box on the main form. I've been trying to
use info from http://www.mvps.org/access/forms/frm0028.htm by Dev Ashish but
either I'm missing something or it's different with a subform.
My main form is"2007DailyRecord". It has a combo box "Projects" which
selects from a table "Projects" The main form has a subform (in datasheet
view if that matters) "2007DailyRecordDetails" with a combo box "Block"
selecting from a table "Blocks". Each record in this table has "BlockID",
"BlockName" and "AssociatedWithProject" fields. Form and subform are linked
and behave properly - there are from 1 to 10 2007DailyRecordDetails for any
2007DailyRecord. When entering data in the subform I want available in the
"Blocks" combo box only the blocks associated with the Project chosen in the
main form.
Any help or suggestions much appreciated.
Brian S.
 
Brian,
In the query behind the Blocks combo in the sub, use this criteria against the
AssociatedWithProject field...
=Forms!frm2007DailyRecord!Projects
That should filter the Blocks combo to show only blocks with associated projects (vs. the
main)
--
hth
Al Campagna
Candia Computer Consulting
Microsoft MVP - Candia, NH USA
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Thank you Al,
I will try your suggestion as soon as I deal with some errors in my work
I just found and will report on success.
Brian S.
 

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