Combo box data vanishing

G

Guest

In a continuous form, I have a task field combo which is used to filter
options for a
position combo AND a materials combo. The position combo works fine, and
materials combo works fine in the current record, but once I move to a new
record, the entry in the materials combo vanishes. It's saved to the
appropriate table (options), but just looks (at best) unprofessional, hard to
edit, etc. Also, the edit form built from the same setup displays a dialog
when opening that asks for the task and only displays the material selected
for the same task as entered.

All combos were set up interactively using SQL in the row source.

Thanks for any suggestions.
 
J

John W. Vinson

In a continuous form, I have a task field combo which is used to filter
options for a
position combo AND a materials combo. The position combo works fine, and
materials combo works fine in the current record, but once I move to a new
record, the entry in the materials combo vanishes. It's saved to the
appropriate table (options), but just looks (at best) unprofessional, hard to
edit, etc. Also, the edit form built from the same setup displays a dialog
when opening that asks for the task and only displays the material selected
for the same task as entered.

All combos were set up interactively using SQL in the row source.

Please post the code and the SQL.

My guess is that the second combo is dependent on the first, so that when you
move to a different record, the second combo's row source no longer returns
any records. This can be a hassle to solve; one way is to create a textbox
displaying the desired value (from DLookUp or by basing the form on a query
joining to the Materials table); carefully superimpose the textbox on the
text area of the combo box. Be sure that the textbox is locked, disabled, and
not a tab stop.

John W. Vinson [MVP]
 
G

Guest

Thanks for your thoughts, John.

When I looked at the detailed design, the task field contains data that can
be entered into different tables, specifically both taskMaterials and
taskPosition tables - each entered as discrete, but they should be the same.
I'll fix this.

You help is much appreciated. Thanks!
 

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