Combo Box - Not in List Property

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

It seems like this should be fairly straight forward but I can't get it quite
right. I have a combo box that finds a record on the form based on what you
select (from the Combo Box Wizard). This works perfectly. However, if
someone types in a value that is not in the list I simply want to "goto" a
new record. I tried using the NotInList property with a GotoRecord statement
but keep getting a run-time 2105 error "You can't go to the specified
record". I tried the same type of thing in a Macro but this actually crashes
Access and you have to restart. I have seen plenty of code on the web to
insert the typed value into the list which is great but I really just want to
move to a new record so the user can fill out everything on the form
themselves. Thanks for any help.
 
If the unbound combo's Bound Column is not zero-width, you could set its
LimitToList property to No, and then just go to a new record if not found.

In this article:
Using a Combo Box to Find Records
at:
http://allenbrowne.com/ser-03.html
replace the line:
MsgBox "Not found: filtered?"
with:
RunCommand acCmdRecordsGotoNew
 

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

Similar Threads

Combo Box Issue 6
synchronized Combo Boxes in subforms 2
combo box list not updating 17
Combo Box - Not In List 1
Combo Box Filter 1
combo box not selecteable 5
Combo Box Display 3
can't select from combo box 4

Back
Top