Problem with IF... THEN expression (1 Viewer)

ToucHDowN

Registered User.
Local time
Today, 13:26
Joined
May 4, 2014
Messages
36
Hi,

I would kindly ask for your help in the following expression problem:

I have Form A, with two text boxes, tbo1 and tbo2. Form A gets its values from query A that has two fields, field A and field B. What I want to do is this:

If tbo1 equals "YYY" then tbo equals field A.


I have no problem in the following expression:

If Me.tbo1 = "YYY" Then
tbo2 = "ZZZZ"
End If


Problem occurs when I try to assign to tbo2 field A's value. How do I refer to a field? I can't seem to write this without a syntax error.


Thanks.
 
Last edited:

burrina

Registered User.
Local time
Today, 15:26
Joined
May 10, 2014
Messages
972
I don't know what those values are or if they are compatible, but try this.
If (Me.tbo1) = "yyy" Then
Me.tbo = fieldA
End If

HTH
 

Users who are viewing this thread

Top Bottom