[AccessD] bound to be my problem

Dan Waters dwaters at usinternet.com
Mon Jan 24 18:19:51 CST 2005


Francisco,

I'm not familiar with ADODB recordsets, but here goes.

I will assume that your form is named 'frm_007N_sbfINprocess'.

To refer to that form's recordset while in the form just say:
    	Me.Recordset
Or for the clone just say:
    	Me.RecordsetClone

To refer to that form's recordset while out of the form then say:
	Forms.frm_007N_sbfINprocess.Recordset
	(of course the form must be open for this to work)
or for the clone then say:
	Forms.frm_007N_sbfINprocess.RecordsetClone

I don't think you need to set a separate recordset to refer to the clone.  


In Access XP you can move the screen to the record you want without
referring to the clone.

This is a piece of code that I use for something similar:

	Me.AllowAdditions = True
	Me.Recordset.FindFirst "ID = " & txtFindRecordID
	If txtRecordID <> txtFindRecordID then
		txtFindRecordID.SetFocus
		MsgBox "Record " & txtFindRecordID & " Not Found"
	End If


Dan Waters
ProMation Systems

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia
Sent: Monday, January 24, 2005 3:58 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] bound to be my problem

I have been beating at this all morning.. while I can get the
recordset bookmark to move correctly in the following "bound" subform,
I can't seem to get the record selected so that the end user can use
it.

any ideas?

CODE snip:::

Dim rsInProcess As adodb.Recordset
Set rsInProcess =
Me.frm_007N_sbfrmINprocess.Form.Recordset.Clone(adLockReadOnly)
rsInProcess.Find "RRID = " & Me.txtRRID, , adSearchForward, adBookmarkFirst
Me.frm_007N_sbfrmINprocess.Form.RRID.SetFocus
   If rsInProcess.EOF = False Then
             Found = True
             Me.frm_007N_sbfrmINprocess.Form.Recordset.Bookmark =
rsInProcess.Bookmark
  End If
rsInProcess.Close
Set rsInProcess = Nothing

::::END CODE snip
-- 
-Francisco
http://pcthis.blogspot.com | PC news with out the jargon!
-- 
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