Microsoft
Software
Hardware
Network
Question : Utilizing array gleamed from GetRows method in Access VBA
Hi. I am using the code below to gather the IDs of the fields where the field 'Invoiced" is checked.
This creates a two dimensional array. I need to use each of the values held in this array but am not sure how. For instance if I use MsgBox UBound(MyID) when there are three values I get 1 returned which doesn't make sense
Dim db As Database
Dim rs As dao.Recordset
Dim MyIds As Variant
Set db = CurrentDb
Set rs = db.OpenRecordset("Select ID from [Room Bookings] where Invoiced = true")
'You might try .MoveLast and .MoveFirst to insure the recordset is filled whe using the GetRows method below
rs.MoveLast
rs.MoveFirst
'/note I also use an arbitrarily large number instead of .Recordcount
MyIds = rs.GetRows(999999)
rs.Close
Set rs = Nothing
Set db = Nothing
Answer : Utilizing array gleamed from GetRows method in Access VBA
It is a 2d array (0,0) - (0, recordcount-1)
So
MsgBox UBound(MyIds, 2)
Will tell you the ubound of the 2nd dimension.
Random Solutions
how to import POP settings from .IAF file? Outlook 2003 from Outlook 2002
Connect to mdb on remote computer via Java
Can i deploy .net framework 3.5 sp1 using group policy?
Any video link which clearly explains how to migrate a P2V and V2V of a windows 2003 server.
Next and Previous Buttons not working
Embedded quotes (") in CSV file
How to figure out ssl authorization for lftp on Linux
Using CSS to format inside of a table cell
how to see the login - history in win 2003 server
Email stay with retry status in the queue of Exchnage 2003.