[AccessD] VBA syntax for selecting a record

John Bartow john at winhaven.net
Fri Jan 19 18:08:23 CST 2007


"Pushing" is a good term for what I needed to do with this particular
instance. The form name is hard coded and that's probably OK for this app.
For general use in the future I'm looking at implementing your previous
post.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby

John,

This is one of the methods of "pushing" a value back to the calling form and
forcing it to move.  Of course this requires the currently open form to
"know" who opened it.  If this is hard coded that is fine, or the calling
form could be passed in as an OpenArg.  You do need to be careful where you
call this method from however since if called too late (as the form is
closing) me.txtKey may not have a valid value. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey

With Forms("Yourformname").Form
  .RecordSetClone.FindFirst "YourPrimaryKeyField=" & Me.txtKey
  If Not .RecordSetClone.Nomatch Then
    .BookMark=.RecordSetClone.BookMark
  End If
End With




More information about the AccessD mailing list