editing current record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My form is set to "continuous form view" so I can see multiple records at
once. It queries a database to display this information. The problem occurs
when I try to add a new record and manipulate the data in a drop down box.
All the data disappears for the old records. ( It is not deleted from the
table but it no longer displays on the screen.) Essentially I am trying to
modify the control source of just the record being modified on the screen and
make the data in the drop down box reflect the input from another field on
the form. Any suggestions?
 
The important thing to notice for a continuous form is that there is ONLY
ONE control for each field. If a control is bound, a new instance of the
control for the field is created for each record. For that reason, you can
make changes to any bound control without chabging the control in other
records. An unbound control however works differently. There is ONLY ONE
control for all the records. If you try to make changes to the control in
any record, the control is changed in all records. This behaviour can not be
changed. Your combobox is apparently unbound and so consequently when you
try to make a change to the combobox, you change the combobox in all
records. Your options are:
1. bind the combobox
2. do whatever you are doing in a different way
 
Penny George said:
My form is set to "continuous form view" so I can see multiple records at
once. It queries a database to display this information. The problem occurs
when I try to add a new record and manipulate the data in a drop down box.
All the data disappears for the old records. ( It is not deleted from the
table but it no longer displays on the screen.) Essentially I am trying to
modify the control source of just the record being modified on the screen and
make the data in the drop down box reflect the input from another field on
the form.


There is only one set of properties for a form control.
It's just displayed multiple times in continuous (or
datasheet) view. This means that you can only get what you
want by playing a devious game with a **bound** control.

Place a text box (bound to the appropriate field) directly
on top of the text portion of the combo box. Now you can
manipulate the combo box's RowSource without changing the
appearance of the other records.

To allow the user to click/tab to the combo box, set the
text box's GotFocus event procedure to immediately (re)set
the focus to the combo box. When the combo box receives the
focus, it will automatically be brought in front of the text
box and behave normally.
 
Back
Top