Form Box Input = Previous?

tbaxter

In Over My Head!
Local time
Today, 04:28
Joined
Jul 19, 2000
Messages
69
I'm pretty sure this has been covered before but, of course, now I can't find it.

I'm using Access 2000. I need to input "inventory" for several locations, one location at a time. How do I set the form up so that, until I change the location in the location box, it stays the same as the last entry? I have several hundred entries per location and dread having to input (or scroll through) the location EVERY entry!

Please help! This is a hi-pri item for me!

Thanks!
 
Make a combo box for your location and place it in a main form. Have your other fields in a subform.
 
If you are just wanting to fill fields with the value of the last entered field check out this post. I included the code there.

Fill form enteries based on previous record

Good Luck!

[This message has been edited by Talismanic (edited 10-27-2000).]
 
I'm using Access 2000. I was unable to find OnExit Even in the Form Properties box. Has it changed between Access 97 and 2000?

One of my boxes is a combo box already. With 26 locations, you can see that it would get tiring scrolling down and looking for the particular location I'm working on! The other is a text box with the short date input mask.

Another question I have deals with reports. I'll slide over to the Report Forum and leave it there.

Thanks!
 
The OnExit for the form isn't where you would want to put it (If I understand your question correctly).

If you have a record set like this:

Customer, City, State, Zip

You could use the OnExit event in the Zip to autofill City, State, and Zip with the previous records entries using the code from that link. This way, if most of your customers are from the same city and state all you have to change is the customer name.
The advantage of doing it like this instead of just setting the default property of the control is that if you are working with several cities you can kind of pre sort them before you enter them so that you only have to change the defaults when you come to the next series of City, State and Zip and those will stay the default until the next series, etc...

In the example I used above the Zip would be the last field in the record. The focus will automaticaly be set to the Customer control when you exit that control and the defaults (from previous record) will fill the other boxes.

[This message has been edited by Talismanic (edited 10-30-2000).]
 
Ahhhh . . . I see now! Thanks for the help! I did the 2 locations I had info for manually already (tedious but necessary). I'll try this on my next location.
 

Users who are viewing this thread

Back
Top Bottom