Show a field " VAcant" or "Occupied"

stargate

Registered User.
Local time
Today, 18:55
Joined
Feb 19, 2004
Messages
20
I have a unbound textbox on the parent form to show either VACANT OR OCCUPIED depending is a chkbox is yes in a field on the subform. Im using a continueous subform to that is automatically checked when a dateout is entered. How can I get the textbox to show Vacant if the yes/no is has a tick in it.

Im not exactly sure how to write the syntax and where to place it.

I need somethings like this.

if chkActive is yes then txtVacanyStatus is OCCUPIED.

hope this makes sense.
 
Control source of txtVacanyStatus:

=IIf(chkActive, "Occupied", "Vacant")
 
I tried =IIf(chkActive, "Occupied", "Vacant") but im getting #Name!

could it be because chkActive is in the subfrom.?
 
Sorry, missed that it was in a subform; try:

=IIf(SubFormName.Form!chkActive,"Occupied","Vacant")
 

Users who are viewing this thread

Back
Top Bottom