data entered through form

  • Thread starter Thread starter JIM.H.
  • Start date Start date
J

JIM.H.

Hello,
I have a form I created with a form wizard that displays
fields from a table. In the form I have a button that
calls a function to export data to excel file. My problem
is when I open form and change data and click button to
export, it does not export the latest change I have done.
But I no the modification is there because when I close
the form, open it again and click, it exports all changes
I made before, what is problem? When I modified data in
the form, when is it written to the table?
Thanks,
Jim.
 
Hello,
I have a form I created with a form wizard that displays
fields from a table. In the form I have a button that
calls a function to export data to excel file. My problem
is when I open form and change data and click button to
export, it does not export the latest change I have done.
But I no the modification is there because when I close
the form, open it again and click, it exports all changes
I made before, what is problem? When I modified data in
the form, when is it written to the table?
Thanks,
Jim.
Jim,
Access doesn't save the new data until you go to a different (or new)
record, close the form, or explicitly save it.
Add a line of code to the command button used to export the data:

DoCmd.RunCommand acCmdSaveRecord
Then do your regular stuff.
 
Back
Top