continuous form help (1 Viewer)

mcalex

Registered User.
Local time
Today, 20:05
Joined
Jun 18, 2009
Messages
141
ok, I've now worked out how get multiple records on one form with a continuous form, but I've now got the problem that when I click a toggle button on the form, all of the toggle buttons for that field change (ie every record's toggle button changes).

The toggle button is bound to a Yes/No field on the query, so I don't know why this is happening.

Any suggestions as to how i get controls to only change for the record in question?

cheers
mcalex
 

mcalex

Registered User.
Local time
Today, 20:05
Joined
Jun 18, 2009
Messages
141
Hi John

I've started on the solution path. Because I'm changing the button picture depending on whether it is on or off, it looks like the code in the AfterUpdate() event causes all buttons to change. When I don't explicitly set any changes {ie no code in _Click() or _AfterUpdate() events} then the buttons work individually. Might just have to live with the (not very visual) default behaviour.

cheers
mcalex
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:05
Joined
Sep 12, 2006
Messages
15,651
a continuous form is REALLY only a single row, when you design it. DATA is filled from the record source, but everything else is formatted the same as the single row

this affects things like command buttons, and also stops you being able to "grey" (ie enabled=no locked=no) certain columns/fields on different rows - if you "grey" one field, the whole column is "greyed"

with Access after A97 you get conditional formatting, but this doesnt solve every issue.
 

mcalex

Registered User.
Local time
Today, 20:05
Joined
Jun 18, 2009
Messages
141
cheers, Dave, i think i get the idea of each 'form' being nothing more than the same view into different data, and understand why unbound controls behave counterintuitively (at least counterintuitive until you 'get' it).

However, the bound toggle button seems to be clever enough to know about the data in its record, until you try to customise it. Ie when you press the (uncustomised) toggle button on a record in a continuous form it 'depresses', and the toggle buttons attached to all other records remain unpressed.

I guess Access uses some array mechanism for each 'form' and the copies of the controls therein and decorates the copies based on the array info, rather than using the control's name, which would only point to the single instance. - or something.

For my purposes, I was just trying to enhance the visual aspect of the data entry. I should be able to get it working using the controls' default behaviour, it just won't be as pretty.
 

Users who are viewing this thread

Top Bottom