Autopopulation of field based on info in seperate table

sarcasmic

New Member
Joined
Jan 4, 2006
Messages
33
I'm not familiar enough with the terminology to describe what I'm trying to do here...

I'd the like a field to be autopopulated based on what is entered into a previous field.

For example, I have to enter in a bunch of information from several different documents which are each refered to by a numeric name (ex "1.1.1") and have a description (ex. "Title of code 1.1.1"). I'd like to be able to enter the numeric name into a 'name' field, and have it automatically insert the description into the 'description' field.

Now, I have created a seperate 2 field table containing in field 1 the name, and field 2 the description. Where do I go from here to have field 2 from this table automatically entered into the description field of my other table based on the "name" field?

Thanks for your help! Let me know if I'm not being very clear, or need a better description.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

VicRauch

Well-known Member
Joined
Mar 23, 2006
Messages
2,032
Make the first field a combo box with your two field table as the source for the combo drop down. In the AfterUpdate event of the combo box, make your second field equal to ComboBox.Column(1) which would be the description from the table.
HTH,
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,300
Office Version
  1. 365
Platform
  1. Windows
You shouldn't really be doing this.:)

You should use a query and join the tables when you need/want to return the description.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
58,249
Office Version
  1. 365
Platform
  1. Windows
To follow up on Norie's point, as a general rule, you shouldn't store a value which can be derived/calculated from other fields in Access via queries. Doing so eliminates the dynamic nature of the database and compromises data integrity.

There shouldn't be any need to anyway, as you can use Query as Sources for Forms, Report, and Data Extracts/Exports.
 

sarcasmic

New Member
Joined
Jan 4, 2006
Messages
33
Thanks for the replies. The reason I wanted to do it is because there may be many instances of each name, and therefore I wouldn't have to type out the description every time, however I think that I will just combine the fields into 1, and bind a combo box to that. Hopefully that will suit my needs all the same.
 

Forum statistics

Threads
1,136,353
Messages
5,675,285
Members
419,559
Latest member
BraytonM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top