Save Record without navigation or closing

ViRi

Registered User.
Local time
Today, 14:26
Joined
Jan 31, 2006
Messages
44
Hi

I have a form with a button and a text box

The control source for the text box is a Number field called FileNo in a Table called File. THe default value of the text box is 0.

When the button is clicked a value is calculated using the last value under FileNo in the Table.

The problem is that I have to either navigate the records or close the form in order to save the new value onto the Table.

I need to be able to save a new value to the Table as soon as it is generated without having to close or navigate. So that I get some new value everytime I click the button without closing the Form.
(when the button is clicked 1 will be added to the last value under FileNo on Table File)

ViRi
 
Use the below code in ur command button click event. see help(F1) for this command.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
hope this will help u.
 
Do MenuItem is obsolete now, use the RunCommand instead
RunCommand acCmdSaveRecord
 

Users who are viewing this thread

Back
Top Bottom