473,486 Members | 2,429 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I set the value of a form control in a macro or VBA procedure?

204 New Member
I have a form which allows the user to make changes to a table through the underlying query. One field in the table and query is "Date_updated".

At the bottom of the form are two buttons - "Confirm and exit" and "Undo changes". If the first is pressed, before saving the record I want to set the [Date_updated] field to today's date, but I can't see how to do this. Can anyone please help?
Nov 11 '16 #1
1 851
nabila06
3 New Member
assuming that your form is associated to the table, you may wanna try this:

Confirm_and_exit_Click()
Date_updated = format (now, "dd mm yyyy")
DoCmd.RunCommand acCmdSave
'the record will be: 12 05 2014
End Sub
Nov 11 '16 #2

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

Similar topics

1
4054
by: DU | last post by:
Assuming you have a typical form built in this manner: <form action="..."> <p><input id="idInputText" name="nameInputText" type="text" size="20"></p> <p><input id="idCheckbox"...
9
2909
by: ckerns | last post by:
I want to loop thru an array of controls,(39 of them...defaults = 0). If value is null or non-numeric I want to assign the value of "0". rowString = "L411" //conrol name if (isNaN(eval...
5
3865
by: Brian Rypstra | last post by:
Does any one know if there exists a form control that can function much like a rectangle control but is circular (or 6 sided say)? Can I make a custom control called circle that groups 6 instances...
3
2007
by: Kurtulus | last post by:
Hi; I have problem for very long time. I have one mdiparent form and several mdichild form. I have tried to change one control on the mdi parent form form anther one. However I have encountered an...
2
350
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I get the value of a form control? -----------------------------------------------------------------------...
2
2116
by: Kc-Mass | last post by:
I have a form that users use to input the fiscal year for an update query. I have that value (after input sitting in a public variable and a Form control. How do I get Access to use that value...
0
944
by: =?Utf-8?B?Q2FybCBEZUxhZ2U=?= | last post by:
I have a form and a subform. The relationship is a 'one' in the form to the 'many' in the subform. There is a control in the form that has text that I need to use in a subform comparison. Whenever...
1
5634
by: psycho | last post by:
How do we return a single value from a stored procedure. Suppose I have a stored procedure like this: create proc dbo.spInsertGroup @ID uniqueidentifier @GroupName varchar(100), @IsActive...
0
7105
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
7132
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
7341
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
5439
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,...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.