Results 1 to 7 of 7

Thread: VB code producing an error

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    5

    VB code producing an error

    Hi,

    I'm working on the following code: -

    Code:
    Dim test As Database
    Dim Rs As DAO.Recordset
    Dim Msg As String
    Dim bFlag As Boolean
    
    Set Rs = CurrentDb.OpenRecordset("query", dbOpenStatic, dbReadOnly, dbOptimisticValue)
    ...
    But I'm having trouble as it returns the Run Time error 3001 "Invalid Argument", the line of code that it doesn't like is -

    Code:
    Set Rs = CurrentDb.OpenRecordset("query", dbOpenDynaset, dbAppendOnly, dbOptimisticValue)
    Can anyone help with a way to solve this error please? Or a way around it without using OpenRecordset?

    I've been stuck trying to solve this error for 3 days now!

    Thanks
    Last edited by Wildster; Jun 25th, 2008 at 03:42 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