devxlogo

Enabling and disabling fields in a repeater

Enabling and disabling fields in a repeater

Question:
Is there a way to enable and disable fields inside a repeater display depending on the values of fields on the master form?I have tried it various ways (on the master form, on the repeater) but I have got the always present “Repeater controls can oly be used with agregation functions.”

Answer:
Ah yes, the old ‘can’t access individual repeater fields’ issue. I haveaddressed this in a separate answer, under the title Set focus inthis repeater grouping.

You can use a similar method to get the handles of each of the objects in arepeater, probably by using a global array. [This would be ideal for arecordset, but I don’t believe you can store object handles in arecordset.] You would then have to keep track of when the rows in arepeater scrolled. You can do this by turning off the scroll bar for therepeater and adding a scroll bar as a separate object next to the repeaterthat would control the movement through the repeater. Or, you could use upand down push buttons, as described under the title Pushbuttons forrepeater movement in this grouping of questions.

Once you can track changes in the repeater, you can design a function towalk through the individual objects in the repeater and enable or disablethem, depending on the values in the underlying row of the recordset.

I haven’t actually tried to code this all myself, but it makes sensethat it would work.

See also  Who are the Modern GPU Cloud Providers?
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist