Full Version: autopopulate form control
UtterAccess Forums > Microsoft® Access > Access Forms
krc777
I would like to be able to autofill the remaining controls on a form based on one control. For ex the table/query behind the form has a list of records with a unique project number and the project can be opened, renewed or closed. When the user creates a new record for the new year I would like the Proj Name, description etc to autofill based on that proj number. I did a search and came up with Dlookup but didn't see how that worked.
Thanks for any help.
Jack Cowley
You do not want to add data that already exists to a new record, as that creates redundant data and that is a no-no in Access. You can refer to the existing data, or whatever, but you do not want to repeat it...
th,
Jack
krc777
I just want them to be able to view the name and description on the form. Nothing new added to the db.
Thanks.
Jack Cowley
Use unbound controls and use a combo box as the source of the ProjectNumbers. The combo box should be based on a query that has, for example, PrimaryKey, ProjectNumber, ProjectDescription. In the After Update event of the combo box:
e.UnboundControlForProjectNumber = Me.ComboBoxName.Column(1)
Me.UnboundControlForProjectDescription = Me.ComboBoxName.Column(2)
hth,
Jack
krc777
Thanks!
Jack Cowley
You are most welcome...
ack
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.