Question How i create a Save Button and A Clear Form Button? (1 Viewer)

Amenofhis

Registered User.
Local time
Yesterday, 17:17
Joined
Jul 29, 2010
Messages
11
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
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 19:17
Joined
Feb 28, 2001
Messages
27,147
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.
 

Amenofhis

Registered User.
Local time
Yesterday, 17:17
Joined
Jul 29, 2010
Messages
11
actually its bound and working very good actually
 

ghudson

Registered User.
Local time
Yesterday, 20:17
Joined
Jun 8, 2002
Messages
6,195
Command to save the current record...
Code:
DoCmd.RunCommand acCmdSaveRecord

Command to clear a text box...
Code:
Me.YourTextBoxNameHere = Null
or
Code:
Me.YourTextBoxNameHere = ""
 

smoses

New member
Local time
Yesterday, 21:17
Joined
Aug 16, 2012
Messages
3
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.
 

Adam Caramon

Registered User
Local time
Yesterday, 20:17
Joined
Jan 23, 2008
Messages
822
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?

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.
 

smoses

New member
Local time
Yesterday, 21:17
Joined
Aug 16, 2012
Messages
3
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

New member
Local time
Yesterday, 21:17
Joined
Aug 16, 2012
Messages
3
Actually I found that link just before I read this reply! Thanks for your help, I appreciate it.
 

Users who are viewing this thread

Top Bottom