Filling a Form when data does not already exist

lubbs65

Board Regular
Joined
Jun 1, 2011
Messages
80
So, i have a form that inputs data into a default table. One of the fields is "names". They select names via combo box. Let's say the user wants to enter the name "John Smith" which is not in the Combo Box (it doesn't already exist but needs to). Upon hitting Enter I want the message "The text you entered isn't an item in the list. Do you want to edit the item in the list?" to open.

I know the default tasks database allows this ability so I'm sure I can do it in my custom database. Any ideas?
 
Is there a macro that allows you to go to a field in a form. So it kind of just skips the tab index order and goes right to say "Supply" instead prior fields in the same form?
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
No, I now know the one way that is best:

As i said earlier, the default Tasks database that can be downloaded has the best method.

I now beleive it even moreso to be true. Again, in there version they don't use event->not in list. Rather, they use Data->List Items Edit Form ->"Name of form that you want to go to"

in my case it is supply 2. Upon entering invalid data we are both asked the same Question (i think its a default):"The text you entered isn't an item in the list. Do you want to edit the items in the list?"

The difference however is that upon hitting yes in the tasks database, it automatically goes to a new record. mine goes to an edited record. I created a command button in my supply form which shoots to a new record. the problem is that I have even made errors in practice where i accidentally over-wrote a previous record rather than saving it.

So the question is, how can i find out how to force a macro for the default proceeding question written above. where Upon selecting yes, it goes to a new form rather than an editted form?
 
Upvote 0
Where did you download this Tasks database?
 
Upvote 0
if you open up access (a new file, not a preloaded one) and hit tasks.

anyway, i found out how to do it. In supplier form (not the base form) i then have to open the forms property sheet. then There were macros to input. I copied it from the default tasks databse and it worked properly. At no point did I have to use "on not in list". The problem was really that i would always click a field or the background of the form before clicking property sheet. this was the problem because it did not open the actual forms property sheet. When i compared property sheets between the default task database and my own i just never searched the forms property sheet. a very elementary mistake. it took me 2 and half days to do something that took me half an hour to complete.

Once that became clear, i simply put in a macro for events->on load

/thread. thanks for sticking with me through the thread norie. i really appreciate it.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,156
Messages
6,183,221
Members
453,152
Latest member
ChrisMd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top