Combo Box Not Updating

J

JD McLeod

I have a form (fingindinput) that is used to populate a table
[findingstable]. On the form, i have some cascading combo boxes
("auditsection" and "auditsubsection"). On the auditsubsection combo box
looks at a query for its control source. On the after update event of
"auditsection" i have a macro that requeries the "auditsubsection" control.
everything works fine while filling out the form, the combo boxes perform as
they should and the data selected is written to the table.

the problem comes in when i go back into the form and scroll through the
records, then the "auditsubsection" combo box is blank for some, but not all
records. the data is still in the underlying table, but it just doesn't
display in the form. to correct this, i went to the form's "on current"
event and entered the same query macro that i have in the after update
section of the "auditsection" control and that worked, except when i close
the form, i get an error message that asks for a parameter value. I
recognize the parameter value as the one used in the query which is the
record source for "auditsubsection".
Please help. I have looked through numerous other posts and didn't find
anything that i understood that would help. thanks.
 
N

NetworkTrade

generally the reason a subform or combobox doesn't show data is that the
cross referencing field is not cross referencing. the requery/refresh won't
solve a missing cross reference...

I would delete that 'on current' instruction - it shouldn't be needed.

if you really are sure the cross reference is good, I would delete and
reinstall the combo box as original. Obviously tweak naming so everything
works.

and then this is your real issue: ...the "auditsubsection" combo box is
blank for some, but not all
records. the data is still in the underlying table, but it just doesn't
display in the form. "

if this is still occurring - I would put the application on a different PC
and see if it has the same behavior if at all possible.


--
NTC


JD McLeod said:
I have a form (fingindinput) that is used to populate a table
[findingstable]. On the form, i have some cascading combo boxes
("auditsection" and "auditsubsection"). On the auditsubsection combo box
looks at a query for its control source. On the after update event of
"auditsection" i have a macro that requeries the "auditsubsection" control.
everything works fine while filling out the form, the combo boxes perform as
they should and the data selected is written to the table.

the problem comes in when i go back into the form and scroll through the
records, then the "auditsubsection" combo box is blank for some, but not all
records. the data is still in the underlying table, but it just doesn't
display in the form. to correct this, i went to the form's "on current"
event and entered the same query macro that i have in the after update
section of the "auditsection" control and that worked, except when i close
the form, i get an error message that asks for a parameter value. I
recognize the parameter value as the one used in the query which is the
record source for "auditsubsection".
Please help. I have looked through numerous other posts and didn't find
anything that i understood that would help. thanks.
 
A

Arvin Meyer [MVP]

I suspect a continuous form here. Cascading combo boxes do not work well in
continuous forms or datasheets. The row source of subsequent rows of data
may not contain the values from the row which has the focus.
 

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