Hello,
I thought that this problem was resolved but no.
I dug a little deeper and discovered that the DAO 3.6 library was missing or corrupted so I choose the adob 2.5 referance, still did not work
The combobox pick filling Listbox1 does work though.
I think I have changed all references to DAO to ADOB
This is the one that still works
This one no longer works
Baffled
I thought that this problem was resolved but no.
I dug a little deeper and discovered that the DAO 3.6 library was missing or corrupted so I choose the adob 2.5 referance, still did not work
The combobox pick filling Listbox1 does work though.
I think I have changed all references to DAO to ADOB
Public FLDNUM As Integer
Public STRSQL As String
Public STRENG As String
Public STRTYPE As String
Public FLD As Field
Public RS As ADODB.Recordset
Public db As ADODB.Connection
Public QDF As ADODB.Connection
Public NUM As Integer
This is the one that still works
Set db = New ADODB.Connection
ENGNUM = Me.CMBENGNEER.Column(0)
STRSQL = "SELECT DISTINCT MATERIAL_NEEDED.ENGID, MATERIAL_NEEDED.ENGINEER, MATERIAL_NEEDED.TYPE, MATERIAL_NEEDED.TYPES_AVAILABLE " _
& "FROM MATERIAL_NEEDED INNER JOIN Q_Engineer ON MATERIAL_NEEDED.ENGID = Q_Engineer.ENGID " _
& "WHERE (((MATERIAL_NEEDED.ENGID)= " & ENGNUM & "))"
Me.LstTYPE.RowSource = STRSQL
Me.LstTYPE.Requery
Set db = Nothing
This one no longer works
Set db = New ADODB.Connection
ENGNUM = Me.LstTYPE.Column(0)
STRTYPE = Me.LstTYPE.Column(3)
STRSQL = "SELECT DISTINCT MATERIAL_NEEDED.ENGID, MATERIAL_NEEDED.TYPES_AVAILABLE, MATERIAL_NEEDED.GRADES_AVALABLE, MATERIAL_NEEDED.SUBTYPES_AVAILABLE " _
& " FROM MATERIAL_NEEDED INNER JOIN Q_Engineer ON MATERIAL_NEEDED.ENGID = Q_Engineer.ENGID " _
& " WHERE ((MATERIAL_NEEDED.TYPES_AVAILABLE)='" & STRTYPE & "') AND (MATERIAL_NEEDED.ENGID)= " & ENGNUM & "));"
Me.LstSUBTYPE.RowSource = STRSQL
Me.LstSUBTYPE.Requery
Set db = Nothing
Baffled