I'm really new with Acces and VBA, so all the help with code is greatly appreciated!
I created a form that kind of works like a switchboard (FRM_A) with two combo boxes [Organization (cbo_org) and Staff Initials (cbo_staff_init )]. Both boxes take the information from Table_A. This form has a “Search” button. See attached PDF file DB 1.
When I hit the “Search” button it will open a second form (FRM_B). Form FRM_B is supposed to open for the corresponding “Staff Initials”.
Form FRM_B has the following: 1 Text box for “Staff Initials”, 4 Combo Box , one is called “Activity Code” (cbo_Acode) which pulls the big list from a table called “Activity_Table ”. The other 3 combox boxes are named : cbo_A, cbo_B, and cbo_C. All 3 combox boxes are just a “Yes, No, N/A” list.
Form FRM_B also has a List Box (Staff_Activity _List) and a “Save” button. See attached PDF file “DB 2”
How I want this to work is that once I select from the list from all 4 combo boxes, the “Save” Button will store the “Staff Initial”, plus the choices that were picked from all 4 combo boxes: “Activity Code”, “cbo_A”, “cbo_B”, and “cbo_C”. I also need this to store the information from the List Box to a Table (Table_B).
To summarize, the help I need on how to code all this are the following:
- How do I code that when I hit the “Search” Button in FRM_A it will open FRM_B with the record of the corresponding “Staff Initials” that were selected from FRM_A.
- How do I code that when I hit the “Save” Button it will store into the List Box (Staff_Activity _List) the “Staff Initial”, plus the choices that were picked from all 4 combo boxes: “Activity Code”, “cbo_A”, “cbo_B”, and “cbo_C”. Also, how do I make it so that it will also store that information into Table_B.
- And to follow up with the first question: How do I code that when I hit the “Search” Button in FRM_A, it will first look into Table_B and pull all the information that may stored already which corresponds to that “Staff Initial” and insert into the List Box so that when FRM_B opens it will list all the information saved for that “Staff Initial”. Otherwise if no information for that “staff initial” in B, it just opens a blank FRM_B.
I created a form that kind of works like a switchboard (FRM_A) with two combo boxes [Organization (cbo_org) and Staff Initials (cbo_staff_init )]. Both boxes take the information from Table_A. This form has a “Search” button. See attached PDF file DB 1.
When I hit the “Search” button it will open a second form (FRM_B). Form FRM_B is supposed to open for the corresponding “Staff Initials”.
Form FRM_B has the following: 1 Text box for “Staff Initials”, 4 Combo Box , one is called “Activity Code” (cbo_Acode) which pulls the big list from a table called “Activity_Table ”. The other 3 combox boxes are named : cbo_A, cbo_B, and cbo_C. All 3 combox boxes are just a “Yes, No, N/A” list.
Form FRM_B also has a List Box (Staff_Activity _List) and a “Save” button. See attached PDF file “DB 2”
How I want this to work is that once I select from the list from all 4 combo boxes, the “Save” Button will store the “Staff Initial”, plus the choices that were picked from all 4 combo boxes: “Activity Code”, “cbo_A”, “cbo_B”, and “cbo_C”. I also need this to store the information from the List Box to a Table (Table_B).
To summarize, the help I need on how to code all this are the following:
- How do I code that when I hit the “Search” Button in FRM_A it will open FRM_B with the record of the corresponding “Staff Initials” that were selected from FRM_A.
- How do I code that when I hit the “Save” Button it will store into the List Box (Staff_Activity _List) the “Staff Initial”, plus the choices that were picked from all 4 combo boxes: “Activity Code”, “cbo_A”, “cbo_B”, and “cbo_C”. Also, how do I make it so that it will also store that information into Table_B.
- And to follow up with the first question: How do I code that when I hit the “Search” Button in FRM_A, it will first look into Table_B and pull all the information that may stored already which corresponds to that “Staff Initial” and insert into the List Box so that when FRM_B opens it will list all the information saved for that “Staff Initial”. Otherwise if no information for that “staff initial” in B, it just opens a blank FRM_B.
Comment