Saving record

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
780
Office Version
  1. 365
Hi,

I have a button in form for saving record but seems not to work because i click save but doesn't show the record i click next and then back still not save.

here it's the code:

Code:
On Error GoTo Err_Command118_Click

    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Company.SetFocus
Exit_Command118_Click:
    Exit Sub

Err_Command118_Click:
    MsgBox Err.Description
    Resume Exit_Command118_Click
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
How is the form set up? Is it based on a table or query? If it is there should be no need to save the record; it will save when you try to move off the record or close the form.
Unless the control that you are trying to save the value for is unbound... in that case you will need code that writes the value to a table field in the current record.

If the form is NOT based on a table or query, you will need code that writes the values to a new record (or edits an existing record) in a table.

In either case (unbound form or unbound control), the Save command won't help you.

Denis
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,705
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top