If [field1] 'Yes', set [field2] to 'Open'

t3nchi

Registered User.
Local time
Today, 05:19
Joined
Sep 28, 2005
Messages
79
If [field1] 'Yes', set [field2] to 'Open'. That's what I'm trying to do.

Field 1 is a combo where I choose between 'Yes' or 'No' from an outside table.
Field 2 is a textbox that I don't have showing on the form.

What code do I put into the 'AfterUpdate' of Field 1 when I change the value to either Yes or No?

I can see it all in C++ code...

{
if Field1==Yes, then Field2==1
else if Field 1==No, then Field2==0
}

But I don't know how to translate to the VBA.
 
t3nchi said:
If [field1] 'Yes', set [field2] to 'Open'. That's what I'm trying to do.

Field 1 is a combo where I choose between 'Yes' or 'No' from an outside table.
Field 2 is a textbox that I don't have showing on the form.

What code do I put into the 'AfterUpdate' of Field 1 when I change the value to either Yes or No?

I can see it all in C++ code...

{
if Field1==Yes, then Field2==1
else if Field 1==No, then Field2==0
}

But I don't know how to translate to the VBA.


I'll take a crack at it.

I have attached an example of the code and a form with what you want.
 

Attachments

thanks man, i see it was a question of syntax.

I got it working now. :D
 
t3nchi said:
thanks man, i see it was a question of syntax.

I got it working now. :D


Man...Hmmm? :confused: Didn't know I was. :D

How did you get it working? Is it simular to what I had? If not I would love to see it, to see if there is a better way.
 

Users who are viewing this thread

Back
Top Bottom