Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not In List event is not firing 1

Status
Not open for further replies.

Pack10

Programmer
Feb 3, 2010
495
US
I have a routine (off a command button) that runs a query and returns the client name in a combo box. The Not In List event used to fire when an item was typed in...but now, with the lookup providing the name the Not In List does not seem to fire.
Is there any workaround?
 
like most events, it requires a user action and does not fire through code.
I am a little confused on this set up of a command button going to a query to put a value in a combobox. Something seems redundant. Why is this value not in the row source of the query, and why have both a command button and a combo to get a name?
This fix would be to check that the value is in the rowsource and then somehow add it to the rowsource. For a better answer you will have to explain more.
 
The user clicks a command button which opens a form containing an account # or a account mnemonic, he the option of entering either one, once that info is entered a query runs and returns the account name. This way they dont have to enter it (can be long) and the info is consistant. The command button is the vehicle to the form containing the user selected info....
hope that helps.
I was hoping to grow a table using "Not in List" and having the account name added to the table.
 
I personally would just skip the not in list event. You could call it, but the order of events could make it confusing.

I would

1) Open the form
2) get the the name
3) check if the name is in the recordsource
basically doing a not in list check
4) if not in the recordsource then add it to your table (or do other similar things contained in the not in list event). Requery the combo.
 
thanks ...i'm going to re do it your way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top