Auto filling certain fields in a form

J

JasonS

In Access 2000, I would like my user to be able to enter data into a form
field, which would in turn automatically fill in two other fields based on
information retrieved from Table A, which is a master table of part numbers.
The user would then fill in more fields in the form. All data would then be
stored in Table B, including the automatic entries. I currently have a
one-to-many relationship established between the Tables A and B, with
referential integrity and cascade updates enforced. I most likely have left
out an important detail, but can anyone help me here?

Jason
 
D

Duane Hookom

I would use a combo box based on TableA which includes fields from the
master table you want to update in TableB. You would use the after update
event of the combo box to set the other text box values.

Me.txtListPrice = Me.cboPartNum.Column(1)
Me.txtWarranty = Me.cboPartNum.Column(2)
 
D

David C. Holley

On the AfterUpdate event of the field, use

Me![field2Name] = DLookup(fieldName, domain/table, whereStatement)
 

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