Add set value to field using a command button

Snufflz

Registered User.
Local time
Today, 14:48
Joined
Mar 12, 2010
Messages
23
Hi everyone,

I am trying to make things a little easier for my users on a data input form.

I would like a command button to enter a value of '1' into a particular field when pressed, and another to enter a value of '0.5' into a different field.

The input form is called 'F:holidays_input' running from a query 'Q:holidays_input' and the two fields are 'Full_day' and 'Half_day'.

I have looked through lots of forums but have not found anything to do this.

I know how to add a new record using code but my tweaks for just one field have got me nowhere.

Any help would be very much appreciated.

Many thanks.

Elaine.
 
Try the following in your button's On Click event;
Code:
Me.ControlName = 1
and in the other button's On Click event;
Code:
Me.OtherControlName = 0.5
 
Hey, that's perfect!

Thank you so much.

x
 
I have a similar problem with the data entry form. I wish to create a command button or a radio button which when selected it will automatically input a value into two or more fields.

For example, when a radio button is selected, a value of '2' would go to 'size1' field and value of '4' would go to the 'size2' field in the table.

Please help in scripting the button to have this result.
 
No, it still doesn't work. Is there anyway you can send me an example of file that works?

All I want to know is how to automatically enter a 'value' into a specific filed when a radio or checkbox is selected.

What is the actual command or function to 'input' the data into the specific field?
 

Users who are viewing this thread

Back
Top Bottom