Edit and save a form

PraizesLiberato

Registered User.
Local time
Today, 06:50
Joined
Dec 6, 2009
Messages
69
Hi All,

I need to Edit and save a form but its doesnt work.

The form I am using has the save button command as.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

The Recordsource is the table itself (tblCustomerMain_tb) and uses a filter like "CIF= 123"

I have another form which uses a query:

"Select * from CustomerDetails where CID=12"

For this the save command works.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

I keep getting the error when clicking the save button that the 'SaveRecord' isnt available now.

I tried both of these methods on the first but still no avail. Need help despreately. I have 3 projects also to work on and this error is driving me nuts.
 

Attachments

  • Save Error.JPG
    Save Error.JPG
    11.2 KB · Views: 96
this could be cause by any number of reasons. More than likely, it has nothing to do with the actual form, but something else going on in the background, or another locked object that's causing the error.

Are any other forms open? Have you tried the alternative code:
Code:
docmd.runcommand accmdsaverecord

A single form opened that is bound to a single table will never throw an error like that.
 
A single form opened that is bound to a single table will never throw an error like that.

True.

I've attached the the picture of the form. but before this form loads there is another form before its that has the same fields and the same query but doesnt allow edit only to View. Is the problem because the form previously was using the same query; cos that form gets replaced when i change the Sourceobject of the subform control which both gets to reside in.

I tried to edit and save starting with the Editcustomer_Form. This works.
 

Attachments

  • EditCust.JPG
    EditCust.JPG
    69.8 KB · Views: 76
Last edited:

Users who are viewing this thread

Back
Top Bottom