[AccessD] Odd Error - Embarrassing Workaround
Rocky Smolin
rockysmolin at bchacc.com
Tue Nov 28 11:46:00 CST 2017
Gustav:
Tried it by modifying as follows:
'On Error Resume Next
'Me.Bookmark = rsMe.Bookmark
DoCmd.RunCommand acCmdSaveRecord
Me.Bookmark = rsMe.Bookmark
'On Error GoTo 0
But that generated the error.
Any other theories?
Thanks
Rocky
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Gustav Brock
Sent: Tuesday, November 28, 2017 8:58 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Odd Error - Embarrassing Workaround
Hi Rocky
You may have to save the record before setting the bookmark.
/gustav
-----Oprindelig meddelelse-----
Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] På vegne af Rocky
Smolin
Sendt: 28. november 2017 17:24
Til: 'Access Developers discussion and problem solving'
<accessd at databaseadvisors.com>; 'Off Topic' <dba-ot at databaseadvisors.com>
Emne: [AccessD] Odd Error - Embarrassing Workaround
Dear Lists:
In the code below which is in the after update event of a combo box, I want
to position the form to the selected vendor in the combo box list. Cookie
cutter. Done it a hundred times:
Private Sub cboVendors_AfterUpdate()
If IsNull(cboVendors) Then Exit Sub
lngID = Val(Me.cboVendors.Column(0))
Set rsMe = Me.RecordsetClone
rsMe.FindFirst "fldVendorID= " & lngID
If rsMe.NoMatch = True Then
MsgBox "Record Not Found", vbExclamation
Else
Me.Bookmark = rsMe.Bookmark
End If
Me.cmdExit.SetFocus
Me.cboVendors.Visible = False
End sub
<snip>
--
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