using vba to do the same thing a setvalue macro does

philbertson

i'm just here
Local time
Yesterday, 21:55
Joined
Jan 27, 2005
Messages
15
is there a way to use vba to do the same thing that the setvalue macro does. if so how do i do it?
 
Pat Hartman said:
Me.SomeControlName = "somevalue"
in the "somevalue" can you put in an expression like [Forms]![Add New Requsition]![Positiontitle].[Column](6)

i'm guessing this would not be right, what would be the VBA equivelant
 
"SomeValue" is any valid expression.

If the code is IN the form:
Me.SomeControlName = Me.Positiontitle.Column(6)

If the code is OUTSIDE the form:
Me.SomeControlName = Forms![Add New Requsition]!Positiontitle.Column(6)
 
working well

i get it now. I have been able to replace all my lookup macros using that. also it help me solve a problem i was having with send the correct infrmation in emails. Althugh i didn't have to get data from other column like in lookups, using the me.control helped me extract data from the form and place it in the email. so finally the emails went to the right destination with the correct info. thanks for the help
 

Users who are viewing this thread

Back
Top Bottom