sanders720
Programmer
@ ----> Compile Error - Argument Not Optional... I am populating combo boxes with the field information in the array below. I.m snagging here "---->".
Thanks in advance for any light you can shed...
A = Array("[IT Job Number]", "Vendor", "[Invoice Number]", "[Requesting User]", "[Authorizing User]", "[Purchase Date]", _
"[Warranty End Date]", "[Product Manufacturer]", "[Product Name]", "[Product Part Number]", "[Product Serial Number]", _
"[CD Key]", "[Upgrade Flag]", "Quantity", "[Seats Covered]", "[User Assignment]", "[Installed PC Name]", _
"[Product License Number]", "[Purchase Price]"
For q = 1 To 19
Debug.Print A(q)
With rs
sql = "SELECT DISTINCT " & A(q) & " FROM qrySoftwareTracking"
Debug.Print sql
.Open sql, CurrentProject.Connection, , adLockOptimistic
.MoveLast
c = .RecordCount
.MoveFirst
For q2 = 1 To c
---> If .Fields & "('" & A(q) & "')" <> "" Then
' LOOKING FOR IF .FIELDS ("[IT Job No]" <> "" Then
Debug.Print .Fields & "('" & A(q) & "')"
Me.cboITJobNo.AddItem .Fields & "('" & A(q) & "')"
End If
.MoveNext
Next q2
.Close
End With
Next q
Thanks in advance for any light you can shed...
A = Array("[IT Job Number]", "Vendor", "[Invoice Number]", "[Requesting User]", "[Authorizing User]", "[Purchase Date]", _
"[Warranty End Date]", "[Product Manufacturer]", "[Product Name]", "[Product Part Number]", "[Product Serial Number]", _
"[CD Key]", "[Upgrade Flag]", "Quantity", "[Seats Covered]", "[User Assignment]", "[Installed PC Name]", _
"[Product License Number]", "[Purchase Price]"
For q = 1 To 19
Debug.Print A(q)
With rs
sql = "SELECT DISTINCT " & A(q) & " FROM qrySoftwareTracking"
Debug.Print sql
.Open sql, CurrentProject.Connection, , adLockOptimistic
.MoveLast
c = .RecordCount
.MoveFirst
For q2 = 1 To c
---> If .Fields & "('" & A(q) & "')" <> "" Then
' LOOKING FOR IF .FIELDS ("[IT Job No]" <> "" Then
Debug.Print .Fields & "('" & A(q) & "')"
Me.cboITJobNo.AddItem .Fields & "('" & A(q) & "')"
End If
.MoveNext
Next q2
.Close
End With
Next q