why does acCmdSelectRecord save record?

  • Thread starter david epsom dot com dot au
  • 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)
 
R

Rick Brandt

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.
 
D

david epsom dot com dot au

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)
 

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