icweb
icweb

Reputation: 57

Label and Enable/Disable a button on a continuous form based upon text control value

In Access is it possible to change the caption of a button based upon a text box control that is displayed on a continuous form?

I'd also like to enable and disable the button on the continuous form depending upon the value in the record's text box control.

I've tried on the OnCurrent form property but that takes the values of the first record of the continuous form and sets all buttons on the continuous form based upon that rather than setting the buttons on the continuous form for each record.

Upvotes: 2

Views: 3762

Answers (2)

southy
southy

Reputation: 1

Try setting the caption in the Detail_Paint event for the form:

cb_SetSpecies.Caption = [Species_Name]

This allows a different value to be set for each record.

Upvotes: 0

Fionnuala
Fionnuala

Reputation: 91376

Unbound controls on a continuous form can only refer to the current record. It may be possible to bind the control in some way. You can use conditional formatting to do a variety of quite interesting things.

Upvotes: 1

Related Questions