Please bear with me as I am new to Access and trying to learn this in two minute increments between service calls for a work assignment.
I have a form with two list boxes. I would like them to cascade. I have the data for both boxes in one table. The fields of the table are populating the first list box. In the second box I would like the information in the columns of the corresponding fields to show up in the second list box.
I've watched the data pig tutorials which have the data set up a little differently in the table. Maybe my set up is not optimal. Looking for some opinions on that, and possibly how to set up the query on the second combo box to select the column of data based on the field name that is selected in the first list box.
I have some VB code attached to the AfterUpdate event of list box one that works when I am on the first record of the forms table. If i navigate to a different record it no longer works.
List84 is the first list box with the fields
lstIssues is the second list box
tblQuestionsProblems is the table with the fields and corresponding data in columns
frmCallRecordEntry is the form this is running on
Code:
Private Sub List84_AfterUpdate()
Dim strSQL As String
strSQL = "SELECT [tblQuestionsProblems].[" & Forms![frmCallRecordEntry]!List84
strSQL = strSQL & "] FROM tblQuestionsProblems;"
Forms![frmCallRecordEntry]!LstIssues.RowSourceType = "Table/Query"
Forms![frmCallRecordEntry]!LstIssues.RowSource = strSQL