How can I change one field automatically in continuous forms?

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

Guest

I am using continuous forms to show a series of records one after another. I
want to allow the user to click a combo box, select a field, and have a text
box update to show another record in that combo box, using the following code:

txtTaskName = cboSelectTask.Column(2)

In certain events. Unfortunitely, this changes the text box on EVERY form
for EVERY record in the list. Is there some way to prevent this, or at least
make the combobox display two columns instead of one?

Thanks!

Dustin
 
I think in continuous forms you can't make this apart instead of an
unbound textbox you use a bound text box to your table that its created
only for this effect and set the control source of your combobox to the
textbox's control source.
 
Dustin,

I might be wrong because I am just getting this VB stuff myself, but try
putting the following code in the "After Update" of the combo box.

Me!txtTaskName = cboSelectTask.Column(2)

If you even need to do it to a field, and not a textbox, use:

Me!YourFieldName.Value = YourComboBox.Column(X)

Again, I have found it best to put this code in the "After Update" of the
Combo.

Michael
LanWanMan
 
Thanks for the idea, but that doesn't work with continuous forms. Because of
the way continuous forms mode works in Access, a change such as the one
you've described will change the value in the textbox for EVERY value on
EVERY record.

Thanks anyway, though!

Dustin
 
I'm having some difficulty envisioning what you're describing...could you
give an example of the code I would be writing?

Thanks.

Dustin
 
Back
Top