Yes/No Box

jonp

Registered User.
Local time
Today, 21:50
Joined
Sep 27, 2000
Messages
42
I know that there is a simple fix for this question but I have not been able to find it YET!

I have an unbound yes/no box that has an IIf statment in its control. However, I have a bound yes/no box that I want to populate to duplicate that of the unbound yes/no box.

Can someone point me in the right direction, please?

Thanks from Texas

JONP
 
I do not know what you IIF statement is doing but code similar to this in the After Update event of the Unbound field will do what you want:

If Me.UnboundFieldName = -1 Then
Me.BoundFieldName = -1
Else
Me.BoundFieldName = 0
End If

If this does not work for you then you will need to tell us about the IIF statement and how the unbound box is changed.
 
I have tried that but no cigar.

Here is a little bit more information.

There is an unbound field in the footer of the form that keeps a total based off of payment entries on a subform. The unbound field displays total outstanding. When the total equals 0 I want a box to automatically be checked off.

I thought if I could just create an invisible yes/no box with an IIf statement then I could achieve this goal.

Does this make any sense?

jonp
 
You will need some way to trigger this code, but it should work:

If Me.UnboundFieldName = 0 then
Me.BoundFieldName = -1
Else
Me.BoundFieldName = 0
End If

You may need to check to see if the Unbound field is Null instead of zero. I do not know how your code is set up in the unbound field...
 

Users who are viewing this thread

Back
Top Bottom