Question Update record

Super Suarez

Registered User.
Local time
Today, 12:12
Joined
Jul 10, 2013
Messages
36
Hi all,

When using Access 2007, I have a new record button, but that record is only written to the db once you navigate away from it. How do I write immediately to the DB, so that record is saved without navigating away from it. I believe I can use ADO or DAO but I'm having difficulties.

Thanks in advance.This what I currently have

Private Sub Command71_Click()
DoCmd.GoToRecord , , acNewRec
MaxValue = DMax("[Record Num]", "Joblog")
Text64.Value = MaxValue + 1
 
How about
Code:
DoCmd.[URL="http://msdn.microsoft.com/en-us/library/office/ff194612.aspx"]RunCommand[/URL] acCmdSaveRecord
 
sorry super but i did laugh when i saw the first reply. you remind me of me. i love to try and over complicate things. i still cant get around the fact that most things in access are very simple and it is us that makes them very complicated.
 
its not your reply that made me chuckle it was the question and how simple your answer was.
 
while we are on this subject, can i ask what the difference is between docmd.runcommand accmdsave & docmd.save
 
DoCmd.RunCommand acCmdSaveRecord will save the changes to the record you are dealing with.

DoCmd.Save saves the design changes made to Form/Report/Query.
 
is it possible to save a record on another form. i have a write conflict on a main form when i tick a check box on a subform. i was thinking the event could include docmd.runcommand accmdsave "Forms!frmClientSalePaymentScreen".

is it possible.
 

Users who are viewing this thread

Back
Top Bottom