cgreenslit
asked on
Using ADODB .Find instead of DAO .Seek
Hi. I just upgraded everybody's PC to Office 2007, only to find that all the DAO stuff I had written in MS Access no longer works. I have a camp sales table with a composite primary key composed of a 2 byte integer and a 7 byte session id. I used to do:
Sales.Seek "PrimaryKey", sess & Id
then do
If Sales.Nomatch ...
Neither .Seek or .Nomatch work any more
I was trying searchstr = "PrimaryKey = " & sess & Id, and then checking for EOF, but this doesn't seem to be the right syntax when I do:
Sales.Find searchstr, , adSearchForward
Can someone help, please?
Chuck Greenslit
Sales.Seek "PrimaryKey", sess & Id
then do
If Sales.Nomatch ...
Neither .Seek or .Nomatch work any more
I was trying searchstr = "PrimaryKey = " & sess & Id, and then checking for EOF, but this doesn't seem to be the right syntax when I do:
Sales.Find searchstr, , adSearchForward
Can someone help, please?
Chuck Greenslit
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"In 2007, ADO is the default,"
Not here it ain't....
The only default refrence is to (the new) DAO.
Not here it ain't....
The only default refrence is to (the new) DAO.
<<The only default refrence is to (the new) DAO.>>
Really? I wasn't aware they switched it back...I don't understand why their DAO calls are not working then.
JimD.
Really? I wasn't aware they switched it back...I don't understand why their DAO calls are not working then.
JimD.
In A2007 DAO is the main thing. The new features are only handled in DAO - not in ADO.
I don't understand why the original code won't work.
It's not clear - and perhaps Chuck will clarify- whether it is giving errors or not running?
I don't understand why the original code won't work.
It's not clear - and perhaps Chuck will clarify- whether it is giving errors or not running?
Chuck,
Not sure why you awarded me an answer, as I was clearly off base. Did you get you problem resolved or were you just trying to get the question closed? If the latter, this should have been deleted as there is no solution.
JimD.
Not sure why you awarded me an answer, as I was clearly off base. Did you get you problem resolved or were you just trying to get the question closed? If the latter, this should have been deleted as there is no solution.
JimD.
eg
dim db as database
or
dim db as dao.database