Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Argument not optional??

Status
Not open for further replies.

foreveryoung

Programmer
Sep 24, 2002
45
GB
I am using DAO 3.6 and am looping through a recordset. When I try to compile the code I get an error message saying "Argument not optional" when I debug it points to the rs.movenext code. I must say that it is Access 95 I am using. I cannot understand why I am getting this message. I notice that, by looking at movenext in the object browser that movenext does expect a parameter. I have never had to use a parameter before using Access 2000. Surely with the same reference (DAO 3.6) whether 95 or 2000 the movenext should work.
Can anyone please explain this to me.
Hope this makes sense to you nice guys (and girls)

David
 
Sorry it is rs.movelast that is expecting a parameter not rs.movenext as above.
 
I would first make sure that you are defining your variables with a reference to dao...

dim rs as dao.recordset
dim db as dao.database

also check your references... make sure you have dao referenced... also make sure you don't have more then one vertion of dao referenced... i've seen things like that cause un known problems...

that's all i can help with, sorry...

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Thanks James

I have tried all this and anything that would be obvious, no luck.
 
ok, can you post your code?? I think that might help... junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top