I would move the code to the after update of the control rather than the form.
Duane Hookom
Get Outlook for iOS
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of david.pratt@outlook.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Monday, June 5, 2017 6:49:45 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Error 2467 When Changing to Design View
Sent: Monday, June 5, 2017 6:49:45 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Error 2467 When Changing to Design View
I have a form that includes a combo cboSite attached to field SiteID. In order to get the value of SiteID to default to the same as the the previous record and speed data entry I have the following code in the form After_Update Event:
If Not IsNull (Me.cboSite) Then
Me.cboSite.DefaultValue = me.cboSite.value
End If
When in Form View the code works just fine and does what I need. However, every time I try to go from Form View to Design View it throws error code 2467 with message:
"The expression you entered refers to an object that is closed or doesn't exist." When it does this, the first line of the IF statement is highlighted.
__._,_.___
Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar