Using a macro to insert a value into a field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I give up. All I want to do is use the SetValue macro action to put a value
(test) into a field on a form. I've read the Access help, and a couple of
posts here, but I clearly don't have the syntax for the expression figured
out. Why is this so difficult. Oh, I forgot, it's MS Access. Any help would
be appreciated.

Thanks.
 
Hi

As you know, the SetValue action of a macro requires 2 parameters, Item and
Expression.

It would be useful to see what you have entered for these and to know if you
get any type of (error) message.

If you are trying to set the value of a text box named MyTextBox that is on
a form named MyForm then the Item parameter should be...

[Forms]![MyForm]![MyTextBox]

Then expression should be whatever you are trying to set it to.

If you are trying to set it to the value of a variable then you need to get
the syntax right here too. To set it to a value from another form use the
following syntax (same as above)...

[Forms]![OtherForm]![OtherTextBox]

hth

Andy Hull
 
Back
Top