Access Design Question

J

Jennifer P.

How do you automatically have a field populate based upon
a value entered in a different field. I am trying to have
a field "description" auto populate everytime the ID
number is entered in the form?
 
I

Ivan Grozney

-----Original Message-----
How do you automatically have a field populate based upon
a value entered in a different field. I am trying to have
a field "description" auto populate everytime the ID
number is entered in the form?
.

If the data is in the same table AND you have the field on
the form than you can do this on the AFTER UPDATE property.
I have the ZIP, CityID, CountyID, and STATEID in the same
table. I tell the form to, AFTER UPDATE, populate the
CITY, STATE, and COUNTY based on what is selected in the
ZIP Field. Also I have the MODDATE auto updated to todays
date.

Private Sub Zip_AfterUpdate()

Me!ModDate = Date
Me!CityID = Me!Zip
Me!StateID = Me!Zip
Me!CountyID = Me!Zip

End Sub


You can also have the after update fire off a query to get
other data.

hth
Ivan
 
K

Kevin3NF

Doesn't answer your question, but why not use a combobox for this? Seems
like it might accomplish the same thing. The description will appear, but
the ID will be stored....

--
Kevin Hill
President
3NF Consulting

www.3nf-inc.com/Newsgroups
 

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