Save Record

jonwentz

Registered User.
Local time
Yesterday, 18:00
Joined
Sep 30, 2004
Messages
38
Hi all,

I am wondering if there is a way to save a record in this manner.

When the user opens the form wait 1 second and then save.

But I would like it to do this only once. I have tried the “on timer” but it keeps saving the record every second.

Thanks in advance
Jon
 
When you save the record then turn off the timer event!
 
ok

how would i go about doing that
 
I understand to set it to 0

but how do i go about doing it in VBA
 
ok i have tried to figure it out but i am still having problems

i cant figure out how to get the timeinterval back to 0 in VBA

thans again
jon
 
jonwentz said:
Hi all,

I am wondering if there is a way to save a record in this manner.

When the user opens the form wait 1 second and then save.

But I would like it to do this only once. I have tried the “on timer” but it keeps saving the record every second.

Thanks in advance
Jon
Why? Sounds like your db has a design flaw. There should be nothing to "save" when the form is first opened. What are you doing that would cause the current record to be "Dirty" in less than one second when the form is first opened?
 
i have a field that auto generates a order number
the problem is that i have 8 users on this db and a soon as they open a new order form it creates the number but if someone else opens the form it gets the same number
 
Can you generate the order number when the order is saved, instead? Much less chance for a conflict, then...

Even if you do get your save-on-generation event to work, there's a small chance you'll end up with two users opening a new order in the same second. Try putting the acSaveRecord code in immediately after the generation code, in the same function?
 
Put Me.TimerInterval = 0 somewhere in the Timer event!
 
jonwentz said:
i have a field that auto generates a order number
the problem is that i have 8 users on this db and a soon as they open a new order form it creates the number but if someone else opens the form it gets the same number
So you want to allow the users to create a record that only has the "order number" saved if they decide to abandon the record? Do as suggested above, create the order number when the user wants to save the completed record. You should have some of the fields set to required to prevent the user from creating an incomplete record.

Check these links out for some working examples that will assist your project.

A Better Mouse Trap?

Enable/Disable The Control Box X Button

Searching the forum is a great way to discover and learn the answers to your Access programming questions.
 

Users who are viewing this thread

Back
Top Bottom