LadyScot101
Registered User.
- Local time
- Today, 15:01
- Joined
- Jun 24, 2013
- Messages
- 18
In Access 2010, I have a SubForm that I have created a Table that has Drop Down Boxes that when the user choses from one box, it lists items in the second box that are only associated with the answer from the first Drop Down Box. Then I'm trying to get it to list from a 3rd Drop Down Box that are only associated with the answer from the second Drop Down Box. I got the second Drop Down to work, but can't get the 3rd to. It gives me incorrect information or it won't clear from the second Box if I change the first Drop Down Box to something different. I'm thinking maybe I should change to VBA on the Account Code (3rd Drop-Down Box), since the usual Drop-Down rules don't seem to be working for it. Here is what I have so far:
The main table that the Drop Down Boxes gets their answers from is called tbl_BudgetPrograms. Here are some sample data:
Program: Administrative
SubPrograms: Office, Furniture, First Step Laborer, Records
Account Codes: If Office is chosen, the Drop Down Box would show: 53010001, 53010007, 52890001, 53890022
Another one is:
Program: Goat
SubProgram: * (only one to choose from in this SubProgram)
Account Codes: 53890022, 52890001
Here are the fields (Field Title - Properties Name) in the SubForm that I have created:
Program Title - Combo459
SubProgram - Combo461
Account Code - Account Code
Here is the code I have for the Program Title:
On the Data Tab on the Program Title Properties:
Control Source: Program Title
Row Source: SELECT DISTINCT tbl_BudgetPrograms.[Program Title] FROM tbl_BudgetPrograms;
Row Source Type: Table/Query
Here is the code I have for the SubProgram:
Control Source: SubProgram
Row Source: SELECT DISTINCT tbl_BudgetPrograms.SubProgram, tbl_BudgetPrograms.[Program Title] FROM tbl_BudgetPrograms WHERE (((tbl_BudgetPrograms.[Program Title])=[Forms]![Order Form]![Request Details].[Form]![Combo459]));
Row Source Type: Table/Query
Here is the code I have for the Account Code:
Control Source: SELECT DISTINCT tbl_BudgetPrograms.[Account Code], tbl_BudgetPrograms.[Account Description] FROM tbl_BudgetPrograms WHERE (((tbl_BudgetPrograms.[SubProgram])=[Forms]![Order Form]![Request Details].[Form]![Combo461]));
Row Source Type: Table/Query
So whatever is chosen in Program Title, it then gives the answers tied to the SubProgram, and then whatever is chosen in the SubProgram is shown in the Account Codes to choose from.
It shouldn't be a problem to take the answers from one Table and not 3 Tables, correct? I just can't get this to work. It should be easy. LOL!
Any help would be greatly appreciated!
The main table that the Drop Down Boxes gets their answers from is called tbl_BudgetPrograms. Here are some sample data:
Program: Administrative
SubPrograms: Office, Furniture, First Step Laborer, Records
Account Codes: If Office is chosen, the Drop Down Box would show: 53010001, 53010007, 52890001, 53890022
Another one is:
Program: Goat
SubProgram: * (only one to choose from in this SubProgram)
Account Codes: 53890022, 52890001
Here are the fields (Field Title - Properties Name) in the SubForm that I have created:
Program Title - Combo459
SubProgram - Combo461
Account Code - Account Code
Here is the code I have for the Program Title:
On the Data Tab on the Program Title Properties:
Control Source: Program Title
Row Source: SELECT DISTINCT tbl_BudgetPrograms.[Program Title] FROM tbl_BudgetPrograms;
Row Source Type: Table/Query
Here is the code I have for the SubProgram:
Control Source: SubProgram
Row Source: SELECT DISTINCT tbl_BudgetPrograms.SubProgram, tbl_BudgetPrograms.[Program Title] FROM tbl_BudgetPrograms WHERE (((tbl_BudgetPrograms.[Program Title])=[Forms]![Order Form]![Request Details].[Form]![Combo459]));
Row Source Type: Table/Query
Here is the code I have for the Account Code:
Control Source: SELECT DISTINCT tbl_BudgetPrograms.[Account Code], tbl_BudgetPrograms.[Account Description] FROM tbl_BudgetPrograms WHERE (((tbl_BudgetPrograms.[SubProgram])=[Forms]![Order Form]![Request Details].[Form]![Combo461]));
Row Source Type: Table/Query
So whatever is chosen in Program Title, it then gives the answers tied to the SubProgram, and then whatever is chosen in the SubProgram is shown in the Account Codes to choose from.
It shouldn't be a problem to take the answers from one Table and not 3 Tables, correct? I just can't get this to work. It should be easy. LOL!
Any help would be greatly appreciated!