Have A value stay until manually changed.

S

Skip Bisconer

I have a form that selects an Order number from a table and assign a letter
in the RouteID field and a Sequence number in a Sequence Field. The table is
my control source.

I have upwards to 500 orders to assign daily to many different delivery
routes. I have the printed orders on hand sorted by route so all I need to do
is call the order number and give it the appropriate Route letter and
Delivery Sequence number. As I may have up to 40 orders per route

I can't seem to figure a way to keep the route letter in the field until I
change it to another route. When I update all the data from teh previous
input goes to the value of the new record because that record is still null
in the table until I assign something to it.
It would cut down a lot of keywork to have it stay. It would also be helpful
if I could have the Sequence field advance by 1 from the last number entered.
Basically I would like to get it down the just keying in the order number,
update, new order number, etc. Then only change the fields when I start
entering a new route. Thanks for any suggestions you may have for me.
 
D

Douglas J. Steele

You can set the control's DefaultValue in its AfterUpdate event. That means
that the field will appear pre-filled with whatever was typed previously,
but you'll be able to overwrite it (and what you overwrite it with will
become the default from then on)

Private Sub MyTextbox_AfterUpdate

Me.MyTextbox.DefaultValue = Me.MyTextbox

End Sub
 
J

Jeanette Cunningham

Skip,
If the route letter is in a one to many relationship with the order, use a
form subform setup.
Choose the route in the main form, use the subform to enter all the orders
for that route.
The route will stay the same until you change to a different route in the
main form.

Jeanette Cunningham
 

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

Top