compile error > QueryDefs Access 2000

J

Jim Bunton

ACCESS 2000 win 2k

*** code snippet ****
dim obposn as integer
obPosn = InStr(cdb.QueryDefs!("EventListByDate").sql, "Order By") - 1
*** END Code Snippet ****

PROBLEM:-
Compile Error:-
QueryDefs! > error > Type declaration character does not match declared data
type



NB
Available References are:-
Visual basic for Applications
Microsoft Access 9.0 Object Library
Microsoft DAO 3.6 Object Library
OLE Automation
 
K

Ken Snell [MVP]

Assuming that cdb is dim'd as a Database object, try this (remove the !
character):

obPosn = InStr(cdb.QueryDefs("EventListByDate").sql, "Order By") - 1
 
J

Jim Bunton

Magic Ken - thanks : why didn't I remember thsi [please don't feel obliged
to answer this!]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top