Auto Field Value From Combobox - Macro Or VBA?, Access 2010
Mar 17 2017, 12:42 PM
Joined: 19-August 14
Hi Access Experts,
I have run into another brick wall on a issue with my database and I need some advice on how to best resolve this and am unsure whether to use a Macro or VBA.
I am putting together a 1st Responder Database and on my Dashboard I have a memo field that needs to be automatically filled in upon the selection of 2 combo boxes.
1) There are 2 combo boxes where 1 (cboActivity2) unbound, gets its choice field from a query based on the selection of the 1st (cboActivity) combo box. The query where cboActivity2 gets its information has different columns with information that is based on the location of the event. For example, 1 choice - 2 different columns with different verbiage based on whether the incident is for Seattle or Tacoma.
2) I have another combo box (DIVISION) that gets its value from another table that lists the separate Divisions, (Seattle, Tacoma, Olympia etc...)
What I would like to do is that the Memo field sees the DIVISION, and the event in cboActivity2 and automatically put the information from the column in cboActivity2 that is based off the DIVISION. Example, Tacoma is currently selected in the Division Box, cboActivity2 has an event the Memo field needs to populate with data that associates then event and DIVISION.
I'm thinking that I have to create another field in the cboActivity2 query that relates to the DIVISION in order for this to happen. What is next after that? The automation will have to happen after the cboActivity2 is updated so the code will go in the cboActivity2 - Event - After Update. What is the code to make this happen?
Mar 18 2017, 06:54 AM
Joined: 26-December 12
From: Western Ma., USA
if i follow what your asking, try googling "cascading combo boxes"
Mar 20 2017, 04:56 PM
Access Wiki and Forums Moderator
Joined: 19-June 07
Re: "What I would like to do is that the Memo field sees the DIVISION, and the event in cboActivity2 and automatically put the information from the column in cboActivity2 that is based off the DIVISION."
Unfortunately, I don't see a DIVISION field in the Activity2 table. How do you define the relationship between the two? In other words, which fields identify the relationship between Activity2 and Division Table?
|Search Top Lo-Fi||27th March 2017 - 11:25 AM|