Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rating: Thread Rating: 8 votes, 5.00 average. Display Modes
Old 08-02-2010, 10:55 AM   #1
Amenofhis
Registered User
 
Join Date: Jul 2010
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Amenofhis is on a distinguished road
How i create a Save Button and A Clear Form Button?

Thanks to vbaInet i manage to get the list of user and names, and after that my friend ask me to make a Save and Clear Button i try to do it using the Wizard button, It doesn't work at all, after i made the button the list didnt appear and the name also didnt show.

Also i want to make it step by step because every time i hit enter start to jump from a text box to another without doing it in order. i want to do it like a letter
first stop then start going down untill u hit the save button. and it do the opposite

Amenofhis is offline   Reply With Quote
Old 08-02-2010, 04:47 PM   #2
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 14,570
Thanks: 92
Thanked 1,682 Times in 1,560 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: How i create a Save Button and A Clear Form Button?

I'm either being dense or you didn't explain this question fully.

Please give us a little more detail in where you start and what you need to produce.

Let me add that if the form is bound, the wizard should be able to make a SAVE button pretty much in its sleep. But if a form is unbound, there is technically nothing to save from the Access point of view. It would make sense that the wizard would be lost. So please clarify your context.
__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is offline   Reply With Quote
Old 08-03-2010, 12:30 PM   #3
Amenofhis
Registered User
 
Join Date: Jul 2010
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Amenofhis is on a distinguished road
Re: How i create a Save Button and A Clear Form Button?

actually its bound and working very good actually

Amenofhis is offline   Reply With Quote
Old 08-04-2010, 04:55 AM   #4
ghudson
Newly Registered User
 
ghudson's Avatar
 
Join Date: Jun 2002
Location: USA
Posts: 6,199
Thanks: 1
Thanked 87 Times in 49 Posts
ghudson has a spectacular aura about ghudson has a spectacular aura about ghudson has a spectacular aura about
Re: How i create a Save Button and A Clear Form Button?

Command to save the current record...
Code:
DoCmd.RunCommand acCmdSaveRecord
Command to clear a text box...
Code:
Me.YourTextBoxNameHere = Null
or
Code:
Me.YourTextBoxNameHere = ""
__________________
.................................................. ......
Searching this forum or Microsoft.com or MSDN.com or Google is a great way to discover and learn the answers to your Access programming questions.

Well if it seems to be real, it's illusion...

I am using Access 2010 with Windows 7

The
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
function on this forum really does work.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

.................................................. ......
ghudson is offline   Reply With Quote
Old 08-16-2012, 04:34 AM   #5
smoses
Newly Registered User
 
Join Date: Aug 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
smoses is on a distinguished road
Re: How i create a Save Button and A Clear Form Button?

Quote:
Originally Posted by ghudson View Post
Command to save the current record...
Code:
DoCmd.RunCommand acCmdSaveRecord
Command to clear a text box...
Code:
Me.YourTextBoxNameHere = Null
or
Code:
Me.YourTextBoxNameHere = ""

Hi there, I have tried this Me.YourTextBoxNameHere = "" and it actually deletes the record from my table instead of just clearing the form. What am I doing wrong? Also, how do I set the form to open up blank instead of filling in something from the table? Sorry, been a long time since I had to build a new DB. Thanks.
smoses is offline   Reply With Quote
Old 08-16-2012, 05:57 AM   #6
Adam Caramon
Registered User
 
Join Date: Jan 2008
Posts: 822
Thanks: 8
Thanked 38 Times in 37 Posts
Adam Caramon is on a distinguished road
Re: How i create a Save Button and A Clear Form Button?

Quote:
Originally Posted by smoses View Post
Hi there, I have tried this Me.YourTextBoxNameHere = "" and it actually deletes the record from my table instead of just clearing the form.
A bound form displays a record from the table. If your textbox is displaying a field from your table, and then you set the textbox to "", that will set the field of the bound table to "". Maybe you could explain what exactly you mean by "clearing the form". Do you want to move to a blank record?

Quote:
Originally Posted by smoses View Post
Also, how do I set the form to open up blank instead of filling in something from the table? Sorry, been a long time since I had to build a new DB. Thanks.
Code:
DoCmd.GoToRecord , , acNewRec
I put that into my Form_Load event.
Adam Caramon is offline   Reply With Quote
Old 08-16-2012, 09:06 AM   #7
smoses
Newly Registered User
 
Join Date: Aug 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
smoses is on a distinguished road
Re: How i create a Save Button and A Clear Form Button?

[QUOTE=Adam Caramon;1182471]A bound form displays a record from the table. If your textbox is displaying a field from your table, and then you set the textbox to "", that will set the field of the bound table to "". Maybe you could explain what exactly you mean by "clearing the form". Do you want to move to a blank record?

Yes, I want to move to a blank record. Or if I typed an error then click the clear form and start over.

smoses is offline   Reply With Quote
Old 08-16-2012, 09:17 AM   #8
Adam Caramon
Registered User
 
Join Date: Jan 2008
Posts: 822
Thanks: 8
Thanked 38 Times in 37 Posts
Adam Caramon is on a distinguished road
Re: How i create a Save Button and A Clear Form Button?

Take a look at the data entry setting:

http://office.microsoft.com/en-us/ac...001232728.aspx

If you use the form only for data entry, this is probably the way to go.
Adam Caramon is offline   Reply With Quote
Old 08-16-2012, 09:51 AM   #9
smoses
Newly Registered User
 
Join Date: Aug 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
smoses is on a distinguished road
Re: How i create a Save Button and A Clear Form Button?

Actually I found that link just before I read this reply! Thanks for your help, I appreciate it.

smoses is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
need help in automatic updating database from xml pushkar1986 Modules & VBA 6 05-27-2013 12:13 PM
Create Reocrd of data in form on button click RECrerar Forms 2 11-24-2008 09:07 AM
create and save a form tomro1 Modules & VBA 1 02-15-2007 11:45 AM
create and save form tomro1 Forms 0 02-15-2007 06:30 AM
create a 'SAVE' button that will commit changes & avoid the 'before update' event? RSIboy Forms 2 08-09-2004 01:12 PM




All times are GMT -8. The time now is 04:33 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World