473,395 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Add a button in Access

48
Hello, I have created a button that adds data to a table. However I would like that when I press the button a message appear saying that data was updated. Can someone help me? Thanks in advance.
Jan 15 '08 #1
7 1549
missinglinq
3,532 Expert 2GB
In the code behind your button

Expand|Select|Wrap|Line Numbers
  1.  Msgbox "Data has been updated!"
  2.  
Linw ;0)>
Jan 15 '08 #2
margot
48
In the code behind your button

Expand|Select|Wrap|Line Numbers
  1.  Msgbox "Data has been updated!"
  2.  
Linw ;0)>
Thank you, but I created the button using the macro builder. So how can I add this feature? Thank you
Jan 15 '08 #3
mshmyob
904 Expert 512MB
I would also put this inside an Onerror event to ensure nothing went wrong with the update otherwise the user might think everything did get updated when it didn't.

In the code behind your button

Expand|Select|Wrap|Line Numbers
  1.  Msgbox "Data has been updated!"
  2.  
Linw ;0)>
Jan 15 '08 #4
margot
48
Thank you, but I created the button using the macro builder. So how can I add this feature? Thank you
Thank you, I was able to do it through micro builder. However how can I clear all the fields after the data was updated.
Thank you in advance.
Jan 15 '08 #5
mshmyob
904 Expert 512MB
Just click on the little button to the right of the Onclick-Event under properties. This will bring up the Macro builder.

Then add a line in and chose MsgBox under Actions and add "Data Updated" in the Message argument at the bottom of the screen.

The problem with doing it there and leaving the default error trapping like Access has it is that if you get an error the message will still pop up.

Best bet is to program it yourself but that is just my opinion.

Thank you, but I created the button using the macro builder. So how can I add this feature? Thank you
Jan 15 '08 #6
margot
48
Just click on the little button to the right of the Onclick-Event under properties. This will bring up the Macro builder.

Then add a line in and chose MsgBox under Actions and add "Data Updated" in the Message argument at the bottom of the screen.

The problem with doing it there and leaving the default error trapping like Access has it is that if you get an error the message will still pop up.

Best bet is to program it yourself but that is just my opinion.
Thank you, through the macro builder can I have a clear option that after the data is updated the fields will be clear?
Jan 15 '08 #7
missinglinq
3,532 Expert 2GB
If this is a bound form, the way to "clear all the fields" is to move to a new record.

Linq ;0)>
Jan 15 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Mark | last post by:
Hi All, Does anyone know of a way that I can get a task bar button to flash if a form is open? I have created something like a messenger application within my database but there are a few people...
1
by: John Michael | last post by:
Is it possible to detect when someone has pushed their Esc button on a form. When a form is open and someone is adding a record, if they push the esc button, the whole form gets reset to an empty...
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
4
by: martin | last post by:
Hello, Is there a way to make a kind of "cancel" button on a form? Suppose you accidently changed or overwrote some data in a form, then I'd like to leave this form at once and cancel any...
24
Dököll
by: Dököll | last post by:
Jumped for joy last night after learning, indeed, the command button wizard can be switched on or off. Well this occured here, with my Access 2000...an attempt to redo at work failed. Here's the...
1
by: blademike | last post by:
Hi guys, I'm new to Access & SQL. Currently using Access 2007. What I have: 1) Table: Employee( empID, empName, email, pwd, ... ) 2) Form: - Record source ( SELECT empName, email, pwd FROM...
1
by: esteban40oz | last post by:
I have 9 buttons on my form. Button1, Button2, Button3, etc I want to create an array to access the value of each of them. Dim buttonArray() As Button = {Button1, Button2, Button3, Button4,...
2
by: TheSouthLondonSlasher | last post by:
Thank you in advance to anyone who may be able to help. This is my first attempt at JavaScript, so I apologize if I've done something blatantly stupid in the below code. Basically, I have a form...
0
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of...
5
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.