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
 
Back
Top