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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 syntax for Datatype

Status
Not open for further replies.

julieatnexus

Technical User
Nov 10, 2000
13
0
0
US
I am trying to replicate a code in Access 2000 that works in Access 97.

The statment "Dim Mydbs as Database" is acceptable in Access 97, but gives a compile error (User defined type not defined).

Any help would be appreciated.

Thanks,

Julie
 
Well in Access 2000 the Visual Basic editor is a separate program and does not know anything so...
Do this:
Open somethign that gets to th eVB editor.
click the "tools" menu
Click the "References"
then put a check in "Microsoft DAO 3.6 Object Library"
click the OK button
Then open References back up to make sure you did it correct.
You should see it at the top along with the other ones (leave them there too.)

Also if the above does not work try this too.

Dim db as DAO.database, rst as DAO.recordset
Set db = currentdb
Set rst = db.openrecordset("yourtable")
a = rst.fields("yourfield")

DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Doug,

Thanks, that solved the Datatype problem. Now it is erroring out in my with statement:


With tblNewQiNum
.Edit
!QiNum = IngBigQiNum
!QiDateTime = Now()
End With

It says method of data member not found and highlights .Edit.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top