In Access, in a form, how do I save data without moving to the ne.

M

Madeleine

I have created a form that asks for input from user. I want the information
typed in to be "saved" to the underlying table before the user leaves that
particular record. I then run some code that transfers the table to an excel
file.

The only way I have been able to transfer the correct info is to have steps
in the code that goes to the next record and then returns to the previous
record. But there has to be a better way!
 
N

Niklas Östergren

Hi!

Ckeck onLine help for < Requery >.

After adding records you need to requery the recordsource to be abel to see
the new record in the form. I guess it´s the same thing with this.

// Niklas
 
J

John Vinson

I have created a form that asks for input from user. I want the information
typed in to be "saved" to the underlying table before the user leaves that
particular record. I then run some code that transfers the table to an excel
file.

The only way I have been able to transfer the correct info is to have steps
in the code that goes to the next record and then returns to the previous
record. But there has to be a better way!

There are two:

DoCmd.RunCommand acCmdSaveRecord

or

Me.Dirty = False

in your code.

(No, it's not obvious from the Help file that either of these exist!)


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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