compile error > QueryDefs Access 2000

  • Thread starter Thread starter Jim Bunton
  • Start date Start date
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
 
Assuming that cdb is dim'd as a Database object, try this (remove the !
character):

obPosn = InStr(cdb.QueryDefs("EventListByDate").sql, "Order By") - 1
 
Magic Ken - thanks : why didn't I remember thsi [please don't feel obliged
to answer this!]
 
Back
Top