I have a code that is;
Dim CurDB As Database
Set CurDB = CurrentDB()
I get error message "Compile Error" User defined type not defined..CurDB As Database is highlighted..
I copied the code from a working MDB form.
What happened??
What version of Access are you using, and what version did you copy the code from?
At a guess, you've copied code from Access 97 (or earlier) into an Access 2000 db. If this is correct, use the format
Dim CurDB As ADODB
You could also check your references (from any module "TOOLS|References" from the menubar) to ensure that Microsoft DAO 3.51 Object Library is checked. If not, add it to your references.
I forgot to check DAO 3.51, but now it says:
"Compile Error"
"Method or data member not found"
Code is:
Do While not RS.EOF
Rs.Edit
Rs.("Selected"=False
RS.Update
Rs.MoveNext
Loop
Rs.Edit is highlighted..
if you go to msdn.microsoft there is a decent article on converting from dao to ado that should help you get a better understanding of the diffrences between the two
good luck
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.