[AccessD] Odd Error - Embarrassing Workaround

Gustav Brock gustav at cactus.dk
Tue Nov 28 11:45:58 CST 2017


Hi Rocky

You have just updated a field:

    cboVendors_AfterUpdate()

/gustav

-----Oprindelig meddelelse-----
Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] På vegne af Rocky Smolin
Sendt: 28. november 2017 18:43
Til: 'Access Developers discussion and problem solving' <accessd at databaseadvisors.com>
Emne: Re: [AccessD] Odd Error - Embarrassing Workaround

Even if no edits?  IOW - record is not Dirty.

R


-----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> 



More information about the AccessD mailing list