UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Auto Field Value From Combobox - Macro Or VBA?, Access 2010    
 
   
Mat11281
post Mar 17 2017, 12:42 PM
Post#1



Posts: 12
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?
Go to the top of the page
 
moke123
post Mar 18 2017, 06:54 AM
Post#2



Posts: 945
Joined: 26-December 12
From: Western Ma., USA


if i follow what your asking, try googling "cascading combo boxes"
Go to the top of the page
 
theDBguy
post Mar 20 2017, 04:56 PM
Post#3


Access Wiki and Forums Moderator
Posts: 69,036
Joined: 19-June 07
From: SunnySandyEggo


Hi Mat,

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?

--------------------
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    27th March 2017 - 05:44 AM