sanders720
Programmer
Query works great in Access per this syntax
SELECT qrySoftwareTracking.[IT Job Number]
FROM qrySoftwareTracking;
Cut does not work in code below, returns -1 for a recordcount..
With rs
sql = "SELECT qrySoftwareTracking." & A(q) & " FROM qrySoftwareTracking"
Debug.Print sql
.Open sql, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
.MoveLast
c = .RecordCount
Debug.Print c
.MoveFirst
For q2 = 1 To c
Debug.Print .Fields(A(q)).Value
If .Fields(A(q)).Value <> "" Then
' Me.cboITJobNo.AddItem .Fields(A(q)).Value
End If
.MoveNext
Next q2
.Update
.Close
End With
Any thoughts??? Thanks in advance for the help...
SELECT qrySoftwareTracking.[IT Job Number]
FROM qrySoftwareTracking;
Cut does not work in code below, returns -1 for a recordcount..
With rs
sql = "SELECT qrySoftwareTracking." & A(q) & " FROM qrySoftwareTracking"
Debug.Print sql
.Open sql, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
.MoveLast
c = .RecordCount
Debug.Print c
.MoveFirst
For q2 = 1 To c
Debug.Print .Fields(A(q)).Value
If .Fields(A(q)).Value <> "" Then
' Me.cboITJobNo.AddItem .Fields(A(q)).Value
End If
.MoveNext
Next q2
.Update
.Close
End With
Any thoughts??? Thanks in advance for the help...