Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2005

Tip: Looking for answers? Try searching our database.

Combo box error customisation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rich1234 - 11 Oct 2005 10:15 GMT
Hi

I have 2 combo boxes on a form.  When the user inputs something that is not
in the list, error 2237 is generated (what you have entered is not in the
list... please select an item in the list.)  In the form's On error event, I
have changed this message to a custom message in user friendly language
relevant to the first combo.

However, if the user makes the same error in the second combo, of course the
same error is generated and the user is greeted with a message relating to
the first combo.  Is there any way I can trap the error generated at the
"combo" level rather than at the form level, and display a relevant error
relating to that specific combo?  

TIA
Rich
Dennis - 11 Oct 2005 11:27 GMT
Use the property 'On Not in List' of each combo box and put your own Message
and then set response = 0.
e.g.
Private Sub Combo1_NotInList(NewData As String, Response As Integer)
   MsgBox "First combo box message"
   Response = 0
End Sub

Private Sub Combo2_NotInList(NewData As String, Response As Integer)
   MsgBox "Second combo box message"
   Response = 0
End Sub

> Hi
>
[quoted text clipped - 12 lines]
> TIA
> Rich
Rich1234 - 11 Oct 2005 13:26 GMT
Thanks Dennis for the advice... it has sorted the issue
rich

> Use the property 'On Not in List' of each combo box and put your own Message
> and then set response = 0.
[quoted text clipped - 25 lines]
> > TIA
> > Rich
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.