basing one combo box on another in a subform

G

Guest

I found the following page
(http://office.microsoft.com/en-us/assistance/HA011730581033.aspx) to show me
how base one combo box on the selection of another. (i.e. When a TYPE is
selected in combobox 1, only associated SUBTYPES appear in combobox 2.) This
was done on a subform and it worked great by itself. When I open the parent
form, however, I get a popup asking me for the parameter
([Forms]![subfrmReqData]![ItemTypeID]) which is the basis of combobox2.
Navigating through records on the main form causes this box to appear with
each new record. Any ideas?
 
G

Guest

When running from the main form, you need to change the path to include the
main form

[Forms]![MainFormName]![subfrmReqData].Form![ItemTypeID]

Change the MainFormName to the name of your form
 
G

Guest

Ofer,

That did the trick! I've been chasing my tail for days on this and really
appreciate your help.

Thanks,
Rich

Ofer said:
When running from the main form, you need to change the path to include the
main form

[Forms]![MainFormName]![subfrmReqData].Form![ItemTypeID]

Change the MainFormName to the name of your form

--
\\// Live Long and Prosper \\//
BS"D


RichNCSU said:
I found the following page
(http://office.microsoft.com/en-us/assistance/HA011730581033.aspx) to show me
how base one combo box on the selection of another. (i.e. When a TYPE is
selected in combobox 1, only associated SUBTYPES appear in combobox 2.) This
was done on a subform and it worked great by itself. When I open the parent
form, however, I get a popup asking me for the parameter
([Forms]![subfrmReqData]![ItemTypeID]) which is the basis of combobox2.
Navigating through records on the main form causes this box to appear with
each new record. Any ideas?
 
G

Guest

Ofer,

The combobox on the subform populates with the data as expected but
something else weird is happening. When the subform loads it only displays
the item subtypes corresponding to the type of the current record. For
example: If I have 3 line items on my subform with a HW (hardware) type and 2
with a SW (software) type the subtypes appear for all HW when I have one of
them selected and nothing appears in the SW subtypes. Once I click on a
record with the SW type the HW subtypes dissapear. The type and subtype
numbers are being correctly stored in my underlying tables but not displayed
in the subform. I hope that make sense.

I've played with the code but cannot seem to figure out how to fix the
problem. Any help would be greatly appreciated...

Thanks,
Rich

Ofer said:
When running from the main form, you need to change the path to include the
main form

[Forms]![MainFormName]![subfrmReqData].Form![ItemTypeID]

Change the MainFormName to the name of your form

--
\\// Live Long and Prosper \\//
BS"D


RichNCSU said:
I found the following page
(http://office.microsoft.com/en-us/assistance/HA011730581033.aspx) to show me
how base one combo box on the selection of another. (i.e. When a TYPE is
selected in combobox 1, only associated SUBTYPES appear in combobox 2.) This
was done on a subform and it worked great by itself. When I open the parent
form, however, I get a popup asking me for the parameter
([Forms]![subfrmReqData]![ItemTypeID]) which is the basis of combobox2.
Navigating through records on the main form causes this box to appear with
each new record. Any ideas?
 

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