Combo Box, NotInList event, capture data

  • Thread starter Thread starter Tom Ross
  • Start date Start date
T

Tom Ross

Hi

I have a combo box (ItemType) reading values from a table.

It is set to limit to list and the not in list event has a message box
instructing the user to select 'Other' in the combo box and then put his new
item in the 'OtherDetails' textbox. If the user selects OK I try to do that
for him with the following code.


ItemTemp = Me.ItemType
Me.ItemType = "Other"
Me.OtherDetails = ItemTemp

However ItemTemp is set to the value that was in the combo box BEFORE the
user tried to enter a new value that is not in the list.
I don't want that value. I want the value that the user typed so I can
store it in the proper place.

Any Ideas?

Tom
 
in the NotInList event procedure, the text typed by the user is already
captured in the NewData argument. in the NotInList event procedure, try

Me.ItemType = "Other"
Me.OtherDetails = NewData
Response = acDataErrContinue

hth
 
thank you.

btw what does ' Response = acDataErrContinue ' do?

Tom
 
take a look at the NotInList Event topic in Access Help, it'll tell you all
about it.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top