[AccessD] VBA syntax for selecting a record

John Bartow john at winhaven.net
Thu Jan 18 22:46:44 CST 2007


Hi Andy,
Thanks but I should've have been more specific (got a head cold and not
thinking real clear :o(

What would be the correct VBA syntax for selecting a record on a continuous
form using the primary key from a separate module be (not the form's own
module).

Here's what I'm after: I'm on a specific form and I change the record being
worked on via code. I want to have the selected record be the same on
another open form (which precedes this form in the work flow). That form
displays the same set of record using the continuous form style.

I want to do this so that when the current form is closed the other form
appears to be highlighting the same record that I switched to on the form
that was just closed.

I hope that is clearer.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey
Sent: Thursday, January 18, 2007 4:01 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] VBA syntax for selecting a record
Importance: High

John
It'd be something like:

With Me.RecordSetClone
.FindFirst "YourPrimaryKeyField=" & Me.txtKey If Not .Nomatch Then
Me.BookMark=.BookMark End If End With


Assumes a field like txtKet holds the record number sought

--
Andy Lacey
http://www.minstersystems.co.uk




--------- Original Message --------
From: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
To: "'Access Developers discussion and problem solving'"
<accessd at databaseadvisors.com>
Subject: [AccessD] VBA syntax for selecting a record
Date: 18/01/07 09:38


What would be the correct VBA syntax for selecting a record on a continues
form using the primary key?

TIA
John B.

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

________________________________________________
Message sent using UebiMiau 2.7.2

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list