hide controls?

  • Thread starter Thread starter r
  • Start date Start date
R

r

In my continuous subform I want to hide a dropdown if the record exists and
allow it only for when the user wants to add a NEW record. Is this doable,
or should I just make another method for the user to enter a new record?

Problem is, if the dropdown is active for the existing records, they can
change the record type, and I can't allow that.

In fact, having the dropdown unavailable (locked? disabled?) would work in a
pinch, too, for those existing records. I'd prefer hidden, but the other
options would do.

Is this possible??
 
Me.MyComboBox.Visible = False

You will not be able to see it or use it, and tabbing will bypass it.
 
Thank you.

Since I want to use this in a continuous form, is it possible to leave it
existing in the "new" record row that is always the last row of the form?
 
My continuous form looks much like a datasheet in that the fields are
tabular, and there are multiple records displayed in rows.

The first control in the row is a dropdown box. It shows the ID for the
record. If the record exists, it must have something in this field, and it
must NOT be changed. For these rows I want the dropdown to be DISabled (or
hidden would do). Other controls in the row are editable.

The last record in the list, like in a datasheet, is the "new" record for
when you want to add a new one. When the user wants to add a new record,
they would begin by selecting an ID from the dropdown box in this NEW record
(the last one) - so for this row I want the dropdown to be AVAILABLE.

Does that make sense?
 
I'm not positive this will work, because I don't do much with continuous
forms, but at least it is worth a try. Put this in the Current event of the
form:

Me.cboMyCombo.Enabled = Me.NewRecord

Me.NewRecord is true if you are on a new record.
 
Back
Top