Fields not displaying info, but table is correct

J

JDJones

I have a continuous form with 4 combo boxes for each record. All are
dependent on the selection of the previous field. That part is working. But
as I move down the records, only the current record displays what's in the
underlying table. The other records go blank. But when I move back to
previous records, they display correctly. I have a Requery set on each combo
box in the OnEnter event. Is this causing the display problem, and if so -
what's the fix?
 
J

John Vinson

I have a continuous form with 4 combo boxes for each record. All are
dependent on the selection of the previous field. That part is working. But
as I move down the records, only the current record displays what's in the
underlying table. The other records go blank. But when I move back to
previous records, they display correctly. I have a Requery set on each combo
box in the OnEnter event. Is this causing the display problem, and if so -
what's the fix?

Yes, it is the problem. The continuous form *appears* to have separate
combo boxes for each record, but it doesn't - there are only four
combos, and when your dependent-combo code changes the Control Source
for one, it changes all the instances.

You can get around this with some hassle, by carefully superimposing a
textbox (locked, disabled, tab stop off) on the text area of the
combo; set its control source to either a DLookUp expression finding
the displayed value, or base the Form on a query including the lookup
tables and display the field value that way.

John W. Vinson[MVP]
 
Top