How to link a subform to Drop down box?

  • Thread starter Thread starter ielmrani via AccessMonster.com
  • Start date Start date
I

ielmrani via AccessMonster.com

Hi All,
I can't make this work.
I have an unbound form with a combo box. I am trying to create a subform
based on the combo box. Is it possible.
Thanks in advance
Ismil
 
Ismil,
I haven't got an answer to your question but I am in the same boat as you
havin the same question for any helpful experts. My set up is I am working on
an access project (adp) connecting to at DB on MS SQL, all 2003.
And rephrasing your question, I have a combo looking up values from a
Customer table on an unbound for and have just added a subform onto that
unbound form which hasn't got any link to the unbound for as the main form is
unbound... the subform is based on a query but basically I would like to have
the query behind this filtered according to the value value I select in the
combo..

Thanks inadvance for any help...
 
You can use the combo box as the Link Master. Set the related field in the
subform as the Link Child.
 
Hi Duane Hookom,
thanks for your reply.
I did as you said but still not working:

Link Master: forms![QryHopitalInfo subform]![Provid]
Link Child: forms![cobHospital]![HOSPITALID]

The link is Provid and HOSPITALID

What I am doing wrong?

Thanks

Ismail
 
A "subform" is a form embedded on a main form. Try set the properties like:

Link Master: cboNameOfComboBox
Link Child: [Name of Field in Subform]

--
Duane Hookom
MS Access MVP

ielmrani via AccessMonster.com said:
Hi Duane Hookom,
thanks for your reply.
I did as you said but still not working:

Link Master: forms![QryHopitalInfo subform]![Provid]
Link Child: forms![cobHospital]![HOSPITALID]

The link is Provid and HOSPITALID

What I am doing wrong?

Thanks

Ismail




Duane said:
You can use the combo box as the Link Master. Set the related field in the
subform as the Link Child.
 
Sorry bout adding extra to this question but what if I had multiple combo
boxes that would be requried to filter for the subform ... and I would like
to be able to edit that data that is filtered onto the subform based on the
combo box values...
Any tips on that would be more than helpful..
 
If you have more than just one or two combo boxes, consider using these in
the criteria of the subform's record source or dynamically build and apply a
sql statement.
 
OfficeBoi,
Try this link, it helped me.

http://www.cbe.wwu.edu/ganz/mis421web/accesstips.htm

Duane said:
If you have more than just one or two combo boxes, consider using these in
the criteria of the subform's record source or dynamically build and apply a
sql statement.
Sorry bout adding extra to this question but what if I had multiple combo
boxes that would be requried to filter for the subform ... and I would
[quoted text clipped - 3 lines]
combo box values...
Any tips on that would be more than helpful..
 
Back
Top