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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

more saving stuff?????

Status
Not open for further replies.

orisons

Programmer
Feb 18, 2002
49
CA
I have recieved alot of help from cajunceturian regarding this and I think I only have one more Question on this subject (just saying that to kid myself I'm near the end)but the if I have multiple forms and the first form is the index do I need to load the other form to recieve info from it (the second form holds the checkbox data) and if so would it still work if I loaded it on startup but kept it invisible until it was called< (I hope someone understands this as I'm getting lost myself)
thankyou
 
Yes, orisons that should work. Will require a slight mod to the code - I am show the loops for the control array

For the startup

Load frmWithCheckBoxes
for i = 0 to NumberCheckboxes - 1
frmWithCheckBoxes.chkChkBox(i).Value = IIf(Mid(CheckBoxConfig, i+1, 1) = &quot;1&quot;, vbChecked, vbUnchecked)
next i

And for the Save

for i = 0 to NumberCheckboxes - 1
CheckBoxConfig = CheckBoxConfig & iif(frmWithCheckBoxes.chkChkBox(i).Value = vbChecked, &quot;1&quot;, &quot;0&quot;)
next i
Unload frmWithCheckBoxes

Couple of Notes: It may be better to call the Form Load and Unload from other places in the code depending on the overall flow of the application.

And the NumberCheckboxes variable is still contained in the main index form because I don't know where or how it gets its value.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top