How do I initialize a form query?

G

Guest

I'm setting up a small database to track projects and what resources are
assigned to each. On a couple of my data entry forms I have a progressive
set of combo boxes that display data based on what is selected in previous
boxes. For example, on one form I have Software vendor, Software Name, &
Software Version Combo boxes. When Microsoft is selected as a software
vendor the, software names displayed when the "software name" combo box is
selected are only those where Microsoft is the vendor. This is done via a
query that runs - set in the data source property. When version is selected
the only versions that are displayed are those relevant to the vendor, name
combination previously selected.

The problem I am having is that, after commiting the first record stored via
my form and moving to a blank record, the results of the previous query are
still used to populate the combo boxes on my form. If I select Oracle as the
vendor on the second record added, the selectable names and versions still
reflect those for Microsoft or whatever vendor was chosen in the first record
added.
 
G

Guest

In the Form's After Update event, reset the row source of the combo boxes to
what they are when the form opens.
Me.MyCombo.RowSource = 'Whatever the original source was
 

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