Recall Togglebutton state

  • Thread starter Thread starter dhendrickson
  • Start date Start date
D

dhendrickson

I have a form with 200+ togglebuttons. This form
represents a circuit card and the toggle buttons
represent electrical points (pins in a connector). When I
click any two togglebuttons (say #1 and #99), code
manipulates a table to show that Pin#1 is now associated
with Pin#99 and Pin#99 is now associated with Pin#1 - the
two pins are connected to each other.

When I reopen the form, the state of the toggle buttons
are all at default (false). I would like some suggestions
on efficient ways to open the form with the togglebutton
matched-pairs information retained. The togglebuttons are
all 'unbound' controls.

I thought about a table to save the state of the form,
but tables have a limitation of 255 columns and I am just
over this. I could create a multistep query, then use a
for...each loop and set each .value and .caption but the
load time for the form turns into several seconds. I
thought about saving some information in the tag for each
togglebutton, but this form also has a combo box that
lets you choose different versions of the circuit card,
each version needing to load a new "saved state". The tag
idea would only accomodate one version.

Thanks for your help.
 
Write a routine in your form OnOpen event to cycle through the toggle buttons in
your table and set the value each corresponding button on your form to true. In
other words, all the buttons in your table will show as depressed when your form
opens. You could also change the font color of the toggle buttons instead of the
value.


--
PC Datasheet
A Resource for Access, Excel and Word Applications
(e-mail address removed)
www.pcdatasheet.com

· Design and basic development for new applications
· Additions, Modifications and "Fixes" for existing applications
· Mentoring for do-it-yourselfers who want guidance
· Complete application design and development
· Applications Using Palm Pilot To Collect Data And
Synchronize The Data Back To Access Or Excel
 
Back
Top