Here is the code on the first listBox After_Update Event
Private Sub ListBoxStateLic_AfterUpdate() 'ListBox1
Dim strtask As String
strtask = "SELECT Cert FROM Qry_PEStateLicCert WHERE LicNum= '" & Me.ListBoxStateLic.Column(1) & "'"
Debug.Print strtask
Me.ListCert.RowSource = strtask 'ListBox2
Me.ListCert.Requery
Me.ListCert = Me.ListCert.ItemData(1)
End Sub
I checked and the immediate window give me the correct Result
SELECT Cert FROM Qry_PEStateLicCert WHERE LicNum= '48435'
The listBox Row Source Type is set to Value List BUT when I am I go to run the program, the listBox 2 shows the SQL language instead of the value itsetlf
So it shows this: SELECT Cert FROM Qry_PEStateLicCert WHERE LicNum= '17265'
Private Sub ListBoxStateLic_AfterUpdate() 'ListBox1
Dim strtask As String
strtask = "SELECT Cert FROM Qry_PEStateLicCert WHERE LicNum= '" & Me.ListBoxStateLic.Column(1) & "'"
Debug.Print strtask
Me.ListCert.RowSource = strtask 'ListBox2
Me.ListCert.Requery
Me.ListCert = Me.ListCert.ItemData(1)
End Sub
I checked and the immediate window give me the correct Result
SELECT Cert FROM Qry_PEStateLicCert WHERE LicNum= '48435'
The listBox Row Source Type is set to Value List BUT when I am I go to run the program, the listBox 2 shows the SQL language instead of the value itsetlf
So it shows this: SELECT Cert FROM Qry_PEStateLicCert WHERE LicNum= '17265'