Just starting out an need help with Lookup

Dhinton

New member
Local time
Today, 06:41
Joined
Aug 19, 2023
Messages
2
Hi all

Im trying to build a knowledge database for my job and thought it would be good to try and develop this using Access.

I have two tables so far - Companies and Contacts. I want to create a contact and select the company using a dropdown. Once the dropdown has been chosen is there any way of populating a field on the contacts table with the Company ID number?

Thanks and sorry if this is a simple one I think this is the first time I have opened Access.

Thanks
Daniel
 
I would bring in the CompanyID and CompanyName into your combo.
First field for me is always the ID field and hidden. Then other fields as needed.
Then if your field in the contacts table is bound to the combo, it is automaticall set?

I do something similar in this diabetes db.
I select a food and the carbs,sugar and fibre are also in the combo, just not visisble.

1692530747070.png
 
I would bring in the CompanyID and CompanyName into your combo.
First field for me is always the ID field and hidden. Then other fields as needed.
Then if your field in the contacts table is bound to the combo, it is automaticall set?

I do something similar in this diabetes db.
I select a food and the carbs,sugar and fibre are also in the combo, just not visisble.

View attachment 109511
Thank you, Gasman,

I think if I understand right that's what I need but how do I create a combo?

I have attached what I have done so far (not much) the idea is for a user to create a contact and associate it with the company then the company form will also bring up all associated contacts.

Thanks for your help much appreciated.

Thanks

Daniel
 

Attachments

I'm guessing what your really trying to do is create a sub form of contacts per company. I have created two new forms frmCompany and sfrmContacts and placed the sub form on the company form.
 

Attachments

Hi Daniel. Welcome to AWF!
 
If you are converting existing data, you are probably starting with just a contacts table and you need to add company to the contact. In most applications, any given contact would only ever be associated with more than a single company.

However, once you convert the existing data, the perspective changes. Going forward, to add a new contact, you would open the company table first and then use a subform to add the new contact. This will be the best way to ensure not adding the same contact multiple times. Contact will NOT stand alone in in the new application. Although, you will may need a search form that will allow you to find the company a contact is associated with if someone called and you didn't get their company name.
 

Users who are viewing this thread

Back
Top Bottom