If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Not in List Event
I have 4 Combo boxes as find boxes and I want to trap and process any input
that is not listed in the Comb drop down. Currently i have the following to handle each combo box and pass the info on to a sub routine called "Not_In_List()" to handle the event. Is there ant way to tidy this up amd have just one routine to handle all of the Find Boxes? Private Sub cmb_Find_Box_1_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 1) End Sub Private Sub cmb_Find_Box_2_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 2) End Sub Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 3) End Sub Private Sub cmb_Find_Box_4_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 4) End Sub Thanks for any help. Regards Ray C |
#2
|
|||
|
|||
Not in List Event
When you say "tidy this up", are you wanting to have a single procedure call
that is 'activated' by any of the four combo boxes? If that is what you seek, then no. Each combo box's NotInList event procedure must be separate in your code. -- Ken Snell MS ACCESS MVP http://www.accessmvp.com/KDSnell/ "Ray C" wrote in message ... I have 4 Combo boxes as find boxes and I want to trap and process any input that is not listed in the Comb drop down. Currently i have the following to handle each combo box and pass the info on to a sub routine called "Not_In_List()" to handle the event. Is there ant way to tidy this up amd have just one routine to handle all of the Find Boxes? Private Sub cmb_Find_Box_1_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 1) End Sub Private Sub cmb_Find_Box_2_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 2) End Sub Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 3) End Sub Private Sub cmb_Find_Box_4_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 4) End Sub Thanks for any help. Regards Ray C |
#3
|
|||
|
|||
Not in List Event
Thanks for the respmse Ken. I kind of thought so but I just wanted to tidy up
the code if at all possible. Once more, thanks for your kind help. Regards Ray C "Ken Snell [MVP]" wrote: When you say "tidy this up", are you wanting to have a single procedure call that is 'activated' by any of the four combo boxes? If that is what you seek, then no. Each combo box's NotInList event procedure must be separate in your code. -- Ken Snell MS ACCESS MVP http://www.accessmvp.com/KDSnell/ "Ray C" wrote in message ... I have 4 Combo boxes as find boxes and I want to trap and process any input that is not listed in the Comb drop down. Currently i have the following to handle each combo box and pass the info on to a sub routine called "Not_In_List()" to handle the event. Is there ant way to tidy this up amd have just one routine to handle all of the Find Boxes? Private Sub cmb_Find_Box_1_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 1) End Sub Private Sub cmb_Find_Box_2_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 2) End Sub Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 3) End Sub Private Sub cmb_Find_Box_4_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 4) End Sub Thanks for any help. Regards Ray C |
#4
|
|||
|
|||
Not in List Event
You can have a generic NotInList event, but you'll need to call it for each
NotInList event on each combo. Here's some Generic NotInList code: http://www.datastrat.com/Code/NotInListCode.txt and here's a demo of how to use it: http://www.accessmvp.com/Arvin/NotInListDemo.zip -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Ray C" wrote in message ... Thanks for the respmse Ken. I kind of thought so but I just wanted to tidy up the code if at all possible. Once more, thanks for your kind help. Regards Ray C "Ken Snell [MVP]" wrote: When you say "tidy this up", are you wanting to have a single procedure call that is 'activated' by any of the four combo boxes? If that is what you seek, then no. Each combo box's NotInList event procedure must be separate in your code. -- Ken Snell MS ACCESS MVP http://www.accessmvp.com/KDSnell/ "Ray C" wrote in message ... I have 4 Combo boxes as find boxes and I want to trap and process any input that is not listed in the Comb drop down. Currently i have the following to handle each combo box and pass the info on to a sub routine called "Not_In_List()" to handle the event. Is there ant way to tidy this up amd have just one routine to handle all of the Find Boxes? Private Sub cmb_Find_Box_1_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 1) End Sub Private Sub cmb_Find_Box_2_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 2) End Sub Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 3) End Sub Private Sub cmb_Find_Box_4_NotInList(NewData As String, Response As Integer) Call Not_In_List(NewData, Response, 4) End Sub Thanks for any help. Regards Ray C |
#5
|
|||
|
|||
Not in List Event
Mr. Meyer,
I checked out your demo and had a question about what you did that might improve what I am working on: On your forms, your have the CustomerID and EventID there, but not visible. What would be the advantage/use of that? VR/Lost |
#6
|
|||
|
|||
Not in List Event
Because the IDs do not matter to the user interface. I also wanted to make
sure that the first physical textbox to gain focus on the customer's form was the customer name so that it would be filled by the value typed into the events form. That avoids having to type it again, it's just passed (using OpenArgs) from the combo on the events form to the customer name textbox in the customers form. This is often difficult for non-database architects to understand. The IDs are keys for connecting data. 99.99% of the time they should have no meaning to any value in the table. Do not use autonumbers for anything meaningful. You will be disappointed when left with gaps or missing values. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Lostguy" wrote in message ... Mr. Meyer, I checked out your demo and had a question about what you did that might improve what I am working on: On your forms, your have the CustomerID and EventID there, but not visible. What would be the advantage/use of that? VR/Lost |
Thread Tools | |
Display Modes | |
|
|