References problem?

  • Thread starter Thread starter Arnfinn Vartdal
  • Start date Start date
A

Arnfinn Vartdal

Is this a problem with missing references?
I get the error "Runtime error 3001: Ugyldig argument" (invalid argument)
when I try to run the code below (from a public sub). The constants
dbopendynamic etc. are not recognized.

Dim rstKalender As Recordset

Set rstKalender = CurrentDb.OpenRecordset("Kalender", dbopendynamic,
dbappendonly)
 
Hi,
You can start by checking to see if you have a reference to DAO, although it
sounds like you do. Then, substitute the values (16 and 8) for the constants and see if that works.
Oh, and declare your rst like:
Dim rstKalender As DAO.Recordset
 
Back
Top