A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

command button for save



 
 
Thread Tools Display Modes
  #1  
Old February 18th, 2010, 03:09 AM posted to microsoft.public.access.forms
ngeng ngok
external usenet poster
 
Posts: 1
Default command button for save

ive created a form in microsoft access 2003. that is the blank form n
will be use as a new data entry form. then, ive created a command
button for the saving data purpose. but i dont know the coding for the
saving purpose. i want to save it to my database. how can i do that?
  #2  
Old February 18th, 2010, 03:21 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default command button for save

On Wed, 17 Feb 2010 18:09:57 -0800 (PST), ngeng ngok wrote:

ive created a form in microsoft access 2003. that is the blank form n
will be use as a new data entry form. then, ive created a command
button for the saving data purpose. but i dont know the coding for the
saving purpose. i want to save it to my database. how can i do that?


You don't actually *need* a button - just moving off the record or onto (or
off of) a subform, or closing the form, will save the record.

If you do want a button anyway, its click event could call a SaveRecord macro,
or if you prefer VBA code,

Private Sub cmdSave_Click()
DoCmd.RunCommand acCmdSaveRecord
End Sub

--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.