Rod-
It appears that you have an "allowable" column in the combo box row source. Why not at least filter the combo to eliminate those rows when on a new record? You can do that in the Form's Current event.
If Me.NewRecord Then
' Make the combo box row source filtered
Else
' Remove the filter.
End If
John Viescas, author
John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications
On Aug 18, 2017, at 12:31, desertscroller@cox.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Good Morning All, I am have an issue (I think) with beforeupdate events. I have a combobox with a list of individuals names. However, only certain items in the list are allowable. The combobox is bound to a table with all items listed for history on older records. The issue is when an unallowable is selected, a message is displayed that it is an unallowable item. The following is the code for the event:
Private Sub Cbo_Day1Instr_BeforeUpdate(Cancel As Integer)
If Control_test(Cbo_Day1Instr.ControlType, Cbo_Day1Instr.Column(2)) Then
Cancel = True
Me.Cbo_Day1Instr.Undo
End If
End Sub
The original status of the control is restored. The issue is when leaving the form the beforeupdate event is fired asking if the record should be updated. The only change was just the one attempt of selecting an unallowable item.
Is this normal progression of events even when the combobox event was canceled and there are no other changes on the form.
Using Windows 10 with ACCESS 2013.
Rod
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
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