event primary key

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Auto populate Access Filed

Auto populate Access Filed

resolvedResolved · Low Priority · Version 2003

Edited on Mon 26 Jul 2010, 14:19

Beverley has attended:
Excel Advanced course
Access Introduction course
Access Intermediate course
Excel VBA Intro Intermediate course

Auto populate Access Filed

Hello

I am setting up a training database. I have a table for schools, a table for mentors and a table for training events. In the training events table i want to be able to select the name (last & first) of the mentor and for it then to auto poulate the mentor id field ( primary key from mentor table). This is so that you dont have to know the mentor id in order to update the database. Is there anyway to do this?

Many thanks

RE: Auto populate Access Filed

Hi Beverley, thanks for your query. You should be able to achieve this by changing the nature of the mentor id field to a Lookup field. You can do this in Design view. If you use the value from the name field (possibly concatenating the first and last names) and use that as your lookup value, could could then get the lookup field to search for that value in the mentor table and bring back the relevant ID number. Using a Lookup field in this way should be the quickest way to achieve what you want.

Hope this helps,

Anthony

RE: Auto populate Access Filed

Hi, thanks for that.

However as the Mentor ID field is a autonumber it cant also be a lookup field so i am not sure how to make it work.

Thanks

Beverley

RE: Auto populate Access Filed

Hi Beverly. If you can't change the Mentor field, you might need to create a custom field to put the relevant information in. I can't advise you any further without seeing the database, but if you upload it I can have a quick look or you can call our information line for assistance.

Hope this helps,

Anthony

Tue 17 Aug 2010: Automatically marked as resolved.


 

Access tip:

Switchboard Startup

An option when you open your Access database that contains all of you tables, forms and queries is only the switchboard is displayed.

To achieve this, select Tools click on Startup. On the right hand side of the Startup screen you are able to select which form you want to open when you open you Access Database. Once you have selected this, there is a check box just below that says "Display Database Window", you need to uncheck this option. Then click ok.

Then when you close you Access database and re open it, the database should open with just the switchboard being shown


View all Access hints and tips


Server loaded in 0.09 secs.