Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SELECT DISTINCT CUSTOMER_NAME FROM CUSTOMERS
Set rst = dbs.OpenRecordset(sQuery, dbOpenSnapshot)
' headings
For iCols = 0 To rst.Fields.Count - 1
Cells(1, iCols + 1).Value = rst.Fields(iCols).Name
Next
Range(Cells(1, 1), _
Cells(1, rst.Fields.Count)).Font.Bold = True
' data
Range("A2").CopyFromRecordset rst
With rst
.MoveLast
.MoveFirst
lRecordCount = .RecordCount
If lRecordCount > 0 Then
vResults = Empty
vResults = .GetRows(lRecordCount)
For i = LBound(vResults, 2) To UBound(vResults, 2)
For j = LBound(vResults, 1) To UBound(vResults, 1)
' do your row and column assignments
Next j
Next i
End If
End With
strSQL = "SELECT alpha.PE_NUMBER, alpha.TRADE_NAME, alpha.MANFCTURER, alpha.TYPE, alpha.DATE, alpha.DATE_ASSGN, alpha.STATUS, alpha.TRACKING
FROM alpha
WHERE (((alpha.PE_NUMBER)= '" & PE_Number$ &"'));"
Set rst = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
With rst
.MoveLast
.MoveFirst
lRecordCount = .RecordCount
If lRecordCount > 0 Then
vResults = Empty
vResults = .GetRows(lRecordCount)
For i = LBound(vResults, 2) To UBound(vResults, 2)
' do your row and column assignments
MsgBox vResults(1, i)
Next i
End If
End With