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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open data entry form with NotInList event

Status
Not open for further replies.

lastout

Programmer
Apr 12, 2002
84
US
I want to open a data entry form when a user enters a value that isn't in the list of a combobox. I've tried putting this code in the OnNotInList event property of the combobox:

DoCmd.OpenForm "DataEntryForm",,,,acFormAdd, acDialog, NewData

But nothing happens. This should work, right? Does anyone have any ideas why it might not be working?
 
The only thing I see wrong is that NewData should be surrouned by double quotes:

DoCmd.OpenForm "DataEntryForm",,,,acFormAdd, acDialog, "NewData"
 
Thanks, I didn't realize that. But shame on me - I hadn't set the LimitToList property to Yes. Now I've got the data entry form loading and all of the remainder of the code still to be written. Back to work! Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top