Auto-Fill text box to text box w/ EDIT capabilities

G

Guest

Hello,

Inside a form, there is a combo box field. When a category is selected from
the combo box, three other text fields auto-fill. In special cases, this
auto-fill function does not apply to the customer record. In these cases, I
would like to edit the content of the auto-fill text boxes. However, Access
does not allow me to do this, because the fields are locked to match the
selection from the combo box. How do I enable the auto-fill function and
EDITING capabilities at the same time?

Thanks, :) I love this discussion board!
Diana
 
G

Guest

Leave the text fields unbound, instead of writing in the ControlSource
Property of the text field =me.comboname.column(0), put on the after update
event of the combo the code
If Customer=criteria then
me.TextField1=me.ComboName.column(0)
me.TextField2=me.ComboName.column(1)
me.TextField3=me.ComboName.column(2)
End If

That way you will fill the contant of the text fields with the right value,
and you can also update this fields.
 
G

Guest

Hello,

Thank you for the code. It works--but not exactly as I would like. Now,
when I make a selection in the combo box, the other text boxes auto-fill with
the correct values. I can also edit the values in these text boxes. This is
great. However, the contents of the text boxes do not get sent to the main
table. They are not recorded. Additionally, if I close the form, and then
reopen it, the text boxes are empty. No information is saved in this portion
of the form.

I guess some might argue that it is redundant to store this information in
the main table, since there is a separate table that designates the
relationships between the combo box value and the text box values. However,
there are instances in which I must edit the text box values to fit some
exceptional circumstance. That's why I need to keep a record.

How can I get the text box values to be stored in the main table?

Thanks,
Diana
 
G

Guest

Bound the fields to the fields of the table, that way they will be saved.
Your fields are probably not bounded
 

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