why does acCmdSelectRecord save record?

  • Thread starter Thread starter david epsom dot com dot au
  • Start date Start date
D

david epsom dot com dot au

I'm debugging some before_update after_update events, which is always
tricky.

According to ancient tradition, this code is used to save the record:

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdSaveRecord

Two questions:

1) Why does the record save (as shown by before_update event) when
you run command acCmdSelectRecord?

2) Why was it traditional to use acCmdSelectRecord before acCmdSaveRecord?


(david)
 
david said:
I'm debugging some before_update after_update events, which is always
tricky.

According to ancient tradition, this code is used to save the record:

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdSaveRecord

Two questions:

1) Why does the record save (as shown by before_update event) when
you run command acCmdSelectRecord?

It does this in the GUI. If you edit a record directly in a datasheet and
then click on the record selector then the changes are saved.
2) Why was it traditional to use acCmdSelectRecord before
acCmdSaveRecord?

Where did you hear that it was? I have never seen code like that before.
All I have ever seen used is the second line by itself or setting the Durty
property to False.
 
Code like that was generated by the Command Button
Wizard in Access 2.0. Since installing 2000, I can't
even get the wizards to work most of the time, so
I can't tell you if that is still the case.

(david)
 
Back
Top