Show record on form, bookmark for record was found using seek?

G

Guest

I used seek to find a record with certain criteria.

I then recorded the bookmark in a variable.

How do I then set the form to show the current record identified by that
bookmark?
 
A

Allen Browne

That's not going to work.

Use FindFirst in the RecordsetClone of the form.
You can then set the form's bookmark to that of the clone set.
 
G

Guest

I don't want to use DAO (FindFirst) because I read that it is dead and ADO is
better. So in ADO there is no way to set a forms record to a bookmark
variable? Is there a way to use a Recordset clone in ADO and then set the
form's bookmark to that of the clone set?
 
A

Allen Browne

You can (and should) use an ADO recordset if the form is based on an ADO
recordset, such as if you use an ADP instead of an MDB.

But if you use regular Access tables, in a normal Access form, you will have
a DAO recordset, because Access itself uses DAO.

About 7 years ago, Microsoft was trying to wean Access users away from DAO,
in the misguided hope that we would all convert to SQL Server back ends.
That's what all the hype was about, including ADPs. Today, ADO is dead,
replaced by the quite different ADO.NET in environments outside of Access,
and ADPs are not well supported in A2007 and Microsoft is suggesting you
don't use those either:
http://www.amazon.com/exec/obidos/t...104-9274862-0445505?v=glance&s=books&n=507846

You should also be aware that MS restored DAO as a default reference in
A2003, and continues to use it in A2007.

So, the information you have been given is:
a) out of date by 2 versions, and
b) never was right in the first place.

DAO is the native library in Access. When you create a query, Access is
using DAO. When you open a form bound to an Access table, Access is using
DAO. The "A" in ADO *is* Access, i.e. the library is designed to expose the
data objects in Microsoft Access.

More info about the libraries:
http://allenbrowne.com/ser-38.html
 
G

Guest

Man this stuff is too confusing! Well it is too late to redo everything. I am
using normal MS Access forms and tables but I have been creating ADO
recordsets and using all ADO properties, methods, and actions. I guess I can
start to incorporate some DAO code now that you have enlightened me on the
real situation.

I'm still amazed that there is not a way to set a form bound to a table to a
certain record based on a bookmark.

I'll try your earlier suggestion to see if applies. Thanks for you help and
understanding.
 
J

Jamie Collins

ADPs are not well supported in A2007 and Microsoft is suggesting you
don't use those either:
http://www.amazon.com/exec/obidos/tg/detail/-/0672319446/qid=10917751...

You are citing Amazon for this?! Seriously, is there a Microsoft
source for this other than blogs? TIA.
About 7 years ago, Microsoft was trying to wean Access users away from DAO,
in the misguided hope that we would all convert to SQL Server back ends.
That's what all the hype was about, including ADPs. Today, ADOis dead,
replaced by the quite different ADO.NET in environments outside of Access

Saying now that ADO is dead is about as helpful as saying seven years
ago that DAO was dead. ADO classic has not been replaced by ADO.NET;
that's like saying VBA6 has been replaced by VB.NET i.e. clearly not
the case in Access land, where IMO ADO classic is more likely to be
replaced by an enhanced version of DAO.

Jamie.

--
 
J

Jamie Collins

When you create a query, Access is
using DAO.

I assume by 'Access' you mean 'the Access user interface' rather than
'the Access engine'. If I use ADO to create/execute a VIEW/PROCEDURE
or execute an ad hoc query then at no point is DAO used.

Jamie.

--
 
R

ruanhong

????:
?????????
Jamie Collins said:
You are citing Amazon for this?! Seriously, is there a Microsoft
source for this other than blogs? TIA.


Saying now that ADO is dead is about as helpful as saying seven years
ago that DAO was dead. ADO classic has not been replaced by ADO.NET;
that's like saying VBA6 has been replaced by VB.NET i.e. clearly not
the case in Access land, where IMO ADO classic is more likely to be
replaced by an enhanced version of DAO.

Jamie.
 
L

liushuai

??!????????
Hello!l have read your artide.
Jamie Collins said:
You are citing Amazon for this?! Seriously, is there a Microsoft
source for this other than blogs? TIA.


Saying now that ADO is dead is about as helpful as saying seven years
ago that DAO was dead. ADO classic has not been replaced by ADO.NET;
that's like saying VBA6 has been replaced by VB.NET i.e. clearly not
the case in Access land, where IMO ADO classic is more likely to be
replaced by an enhanced version of DAO.

Jamie.
 

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