Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record won't save when using DoCmd.Save 2

Status
Not open for further replies.

Stevehewitt

IS-IT--Management
Jun 7, 2001
2,075
0
0
GB
Hey people!

Don't know if this belongs in the VBA forum, but I'll try here first.

I have a form where if the details are completed the user clicks the save button. This save button does all sorts of stuff (autenticates details etc) but has a DoCmd.Save string in it in the OnClick event.

The problem is that the record doesn't save!!! If a user clicks the Menu Bar - Record - Save Record then no problem. If the user closes the form, or switches to another record - again - no problem!
Not a big issue normally, but I want users to generate reports based on the information they have just typed into the record.

Any ideas why this isn't working?


Thanks,



Steve.
 
Hi

Are you using a construct like

If Me.Dirty Then
docmd.runcommand acCmdSaveRecord
End if

?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
No I'm not. Should I be? I just have:

Code:
DoCmd.Save

on the OnClick Event.
 
Ken's answer is correct. The docmd.save just saves the current object, in this case the form itself. It is the equivalent of using File/Save.

HTH,
Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top