Forms Programming

  • Thread starter Thread starter Karen Howard
  • Start date Start date
K

Karen Howard

I would like to know the "Event Procedure" for assigning a
command button that once I update the form's data (i.e.,
add new information to a field), I can click on the
preview report button and this information has already
been updated.

What I currently have to do is go to the "Next" record and
preview the report for the previously inputted information
to be viewed on the report. Any suggestions? Thanks!
 
Karen Howard said:
I would like to know the "Event Procedure" for assigning a
command button that once I update the form's data (i.e.,
add new information to a field), I can click on the
preview report button and this information has already
been updated.

What I currently have to do is go to the "Next" record and
preview the report for the previously inputted information
to be viewed on the report. Any suggestions? Thanks!

Me.Dirty = False
or
DoCmd.RunCommand acCmdSaveRecord

I prefer the former as the second one applies to whatever form has focus which in
some cases might not be the form you intend to do the save on. In your case that
would not be a problem since the form would have to have focus when the command
button was clicked on.
 
Karen Howard said:
I set the "Focus" for the form? Please advise. Thanks!

As I stated in my previous rely. If you run this code as the result of pressing a
command button on the form where you want the save to occur then that form will
already have focus (you just clicked on one of its objects).
 
Back
Top