If is Visble Then Control is True

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

If Me.Lbl383.Visible = Nz(Me.Text362, 0) = 0
In other words if Lbl383 is visible then (CheckBox) Due value will be True
control source set to Due
The control is a True/False check box with its default being set to False
Control name is Due
 
Dave,

Try:

If Me.Lbl383.Visible = True Then Me.Due = True

or

Me.Due = Me.Lbl383.Visible

The difference between the two is that the former will set Due if the label
is visible and do nothing if not, whereas the latter will always set/reset
Due according to whether the label is visible or not.

HTH,
Nikos
 
Dave,

Just saw your other post. Is it the same case? If yes I was answering the
wrong question, I thought you were trying to set the value of anothe control
on the same form here.

Nikos
 
This does work and changes the check box to true, but it also makes the form
go into an edit mode with the pencil and thefore not saved.
Any suggestions?
 
Dave,

So this is what you wanted, but you also want the record saved immediately?
In this case just add this line of code right after the previous one:

DoCcmd.RunCommand acCmdSaveRecord

HTH,
Nikos
 
Back
Top