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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Button on a Form

Status
Not open for further replies.

psyam

Programmer
Jul 29, 2005
4
US
Hi,
I have a form with save button on it.All I want it to do is ..Save the data on the form to the table .
This is the code I am using:
Private Sub btnSave_Click()
DoCmd.RunCommand acCmdSave
'DoCmd.Save
End Sub

But the form is unable to save the data on to the table.

Thanks for ur time...
 
Is the form bound to the table you are wanting to save to?
 
The name of the table should be in the record source property of the form.




Program Error
Programmers do it one finger at a time!
 
psyam,

Wrong command. acCmdSave is the command to save design changes to a form or report in design view. I think you want acCmdSaveRecord.

HTH,

Ken S.
 
Ya, Thank you. acCmdSaveRecord is serving the purpose.


Thanks,
Syam.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top