Results 1 to 1 of 1

Thread: How do you dynamically pass in multiple key values for a seek command?

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Chicago
    Posts
    40

    Question 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.
    Last edited by OhYeahLach; Oct 13th, 2003 at 09:11 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width