How do you dynamically pass in multiple key values for a seek command?
I want to pass in multiple key values to a seek command, how do I do that with one piece of code. I tried an array and it didn't work. I might have 1 key value or up to 8 key values. I don't want to have a line of code for each scneario.
Private SeekResults As Recordset
Set SeekResults = DatabaseRef.OpenRecordset(TableName, dbOpenTable)
Dim marray() As Variant
ReDim marray(1) As Variant
marray(0) = "0001"
marray(1) = "Frozen"
SeekResults.Index = IndexName 'mTable.Indexes(i).Name
SeekResults.Seek "=", marray()
This doesn't work add I tried Array("0001", "Frozen") which doesn't work either. The code doesn't bomb, it just says no match. If i put in SeekResults.Seek "=", "0001","Frozen" it works.