Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update control property on form open 1

Status
Not open for further replies.

spikeytenpin

IS-IT--Management
Jun 30, 2010
2
GB
I have a tabular form, that for arguements sake returns 2 fields. (Field1 and Field2) Each record has a control button that I want to set to enable, only if the the value of Field1 = the value of Field2.

I can do this very easily by setting the control value to enable=false by default and putting a simple 'if' on one of the field events in a record, but when I put the 'if' code on Form open, it looks at the first record in the form and sets all of the controls for all records based on that records evaluation.

I really want to evaluate all of the records independantly when the form opens, and set appropriate values to the record control.

Users of this form may not necessarily have access to any of the field1 or field2 data, so the only action they are likely to carry out is click the control, so the 'if' evaluation needs to be somewhere on the form and not at record level.

Any help gratefully appreciated.
Thanks
 
You will have to consider a different interface. You can not have an unbound control in a continous form and expect to have different property values for each record. There is really only one control and all others are an image of that control. You change one and all will change.
You can use conditional formatting to do this. Use a textbox formatted to look like a command button. You then can able and disable it using conditional formatting.
 
Thank you for your help. I hadn't considered that as an option. Nice and simple.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top