sanders720
Programmer
----> X = sql (located about half way down) does not change the property. I am trying to change the value of RowSource from the defined array's. The sql statement works and is counting the data correctly.
Please let me know if you have any ideas, and thank you in advance for the help...
Set rs = New ADODB.Recordset
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]"
B = Array("cboITJobNumber", "cboVendor", "cboInvoiceNumber", "cboRequestingUser", "cboAuthorizingUser", "cboPurchaseDate", _
"cboWarrantyEndDate]", "cboProductManufacturer", "cboProductName", "cboProductPartNumber", "cboProductSerialNumber", _
"cboCDKey", "cboUpgradeFlag", "cboQuantity", "cboSeatsCovered", "cboUserAssignment", "cboInstalledPCName", _
"cboProductLicenseNumber", "cboPurchasePrice"
For q = 1 To 19
Debug.Print A(q)
Debug.Print B(q)
X = "Me." + B(q) + ".RowSource"
Debug.Print X
With rs
sql = "SELECT qrySoftwareTracking." & A(q) & " FROM qrySoftwareTracking;"
Debug.Print sql
----> X = sql
.CursorLocation = adUseClient
.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
Next q
Set rs = Nothing
End Sub
Please let me know if you have any ideas, and thank you in advance for the help...
Set rs = New ADODB.Recordset
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]"
B = Array("cboITJobNumber", "cboVendor", "cboInvoiceNumber", "cboRequestingUser", "cboAuthorizingUser", "cboPurchaseDate", _
"cboWarrantyEndDate]", "cboProductManufacturer", "cboProductName", "cboProductPartNumber", "cboProductSerialNumber", _
"cboCDKey", "cboUpgradeFlag", "cboQuantity", "cboSeatsCovered", "cboUserAssignment", "cboInstalledPCName", _
"cboProductLicenseNumber", "cboPurchasePrice"
For q = 1 To 19
Debug.Print A(q)
Debug.Print B(q)
X = "Me." + B(q) + ".RowSource"
Debug.Print X
With rs
sql = "SELECT qrySoftwareTracking." & A(q) & " FROM qrySoftwareTracking;"
Debug.Print sql
----> X = sql
.CursorLocation = adUseClient
.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
Next q
Set rs = Nothing
End Sub