Update fields in a Record automatically

goaksmith

Registered User.
Local time
Today, 09:39
Joined
Jul 31, 2002
Messages
74
I have a form, I want a macro to fill in certain fields on the form when I run the macro. How do I do this?
 
Hi, this is what you do- go into the macro design area and look for a Action code called SetValue. On the bottom of the macro area will be two fields: Item and Expression. In Item put the field to be updated, click on the "..." button to help find the field so you don't have to type it in. In Expression put the field where the information to be copyed lives. Thats it, that is all there is to it.

If you need additional help, email me direct
dakcg@aol.com

DAKCG
 
It works when I have to update a field to a number, but is there something else I have to do if I want the field to update to text?
 
No, there should be no difference. Just pick the text field you want to update, and the text field where the info you want to use lives.
 
I go to create the macro. I put SetValue as my action. Then I go to the bottom and use the ... to help me find my Item. Then I go to the expression and type in the text that I would like to use. I then get this error message.

"Microsoft Access can't find the name 'Co Cash Fixed Ltr' you entered into the expression.

You may have specified a control that wasnt
 
I go to create the macro. I put SetValue as my action. Then I go to the bottom and use the ... to help me find my Item. Then I go to the expression and type in the text that I would like to use. I then get this error message.

"Microsoft Access can't find the name 'SEI' you entered into the expression.

You may have specified a control that wasnt on the current object without specifiying the correct form or report context.

To refer to a control an another form or report, precede the control name with the name of the collection, usually either Forms or Reports, and the name of the form or report which the control belongs.
For example, Forms![Products]![Units in Stock]."

Here is exactly what I have typed into the macro.

Action
SetValue

Item = [Forms]![DDA to DDA]![Cr Description]
Expression = [SEI]

I am sure I am doing something very simple wrong, but I am sort of new at this and I am not seeing it. Any help would be appreciated. Thanks.
 
If you are going to put text in the Expression box you have to put a ' in front and back of the expression. Then it works.
 

Users who are viewing this thread

Back
Top Bottom