[AccessD] Odd Error - Embarrassing Workaround

Gustav Brock gustav at cactus.dk
Wed Nov 29 02:53:41 CST 2017


Hi Rocky

Strange. Then it should work with no errors.

/gustav

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

Oh, It's an unbound combo box where the user selects a vendor from the list of vendors that they want to view/edit.

In any event, I tried the Save but unfortunately didn't work.  Sent the code snip of the mod to test it.

r

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Tuesday, November 28, 2017 9:46 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Odd Error - Embarrassing Workaround

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