A very clever idea, Victor! David
David Blocker [EMAIL PROTECTED] 781-784-1919 Fax: 781-784-1860 Cell: 339-206-0261 ----- Original Message ----- From: "Victor Timmons" <[EMAIL PROTECTED]> To: "RBG7-L Mailing List" <[email protected]> Sent: Friday, June 03, 2005 2:41 PM Subject: [RBG7-L] - Re: Form Questions. use same Id? > You could add your ComponentID to a lookup table group them at the table > level and then use a cursor to lookup the ComponentID > > DECLARE c1 CURSOR FOR SELECT + > ComponentID, + > FROM FormComponentIDs + > ORDER BY FormComponentIDs + > WHERE ComponentGroup = 1 AND cFormName = 'Customer' > > OPEN c1 RESET > FETCH c1 INTO + > vComponentID INDIC ivComponentID > WHILE SQLCODE <> 100 THEN > PROPERTY .vComponentID VISABLE 'FALSE > FETCH c1 INTO + > vComponentID INDIC ivComponentID > ENDWHILE > CLOSE c1 > > > On 3 Jun 2005 at 10:14, Michael Moser wrote: > > > Thanks Javier - I see that you are correct -- I had'nt got the latests posts when I added my 2 cents. > > > > :-) > > > > I certainly second the idea of some sort of ability to "group" controls > beyond naming them all the same. That would be very handy. > > > > Michael > > > > >> Michael: > > >> I believe that this is what was being discussed; however, when you > use the > > >> same ID for all controls, then you lose the ability to address them > > >> individually... > > >> Javier, > > > > >> Javier Valencia, PE > > >> President > > >> Valencia Technology Group, L.L.C. > > >> 14315 S. Twilight Ln, Suite #14 > > >> Olathe, Kansas 66062-4578 > > >> Office (913)829-0888 > > >> Fax (913)649-2904 > > >> Cell (913)915-3137 > > >> ================================================ > > >> Attention: > > >> The information contained in this message and or attachments is > intended > > >> only for the person or entity to which it is addressed and may > contain > > >> confidential and/or privileged material. Any review, > retransmission, > > >> dissemination or other use of, or taking of any action in reliance > upon, > > >> this information by persons or entities other than the intended > recipient > > >> is prohibited. If you received this in error, please contact the > sender > > >> and > > >> delete the material from all system and destroy all copies. > > >> ====================================================== > > > > >> -----Original Message----- > > >> From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of > Michael Moser > > >> Sent: Friday, June 03, 2005 11:29 AM > > >> To: RBG7-L Mailing List > > >> Subject: [RBG7-L] - Re: Form Questions. use same Id? > > > > >> Larry, > > > > >> I may have missed something but I give all the controls the same > Id. Then > > >> I > > >> can make a group of controls True/False with a single command. > When > > >> adding > > >> a new control, it gets the same Id then behaves the same way as the > rest > > >> with no programming changes. > > > > >> That not withstanding, I still like your suggestions. > > > > >> :-) > > > > >> Michael > > > > > > >> Michael Moser > > >> EXAQ Micro Services > > >> www.exaq.com > > >> Phone: 916-966-8313 > > >> Fax: 916-244-0582 > > > > >> >> > You are correct Larry, I am trying to save coding work by > placing > > >> the > > >> >> > decision of whether the form is accessed in the EDIT or > BROWSE > > >> modes > > >> >> inside > > >> >> > the form rather that have to code everywhere the form is > called. > > > > >> >> Right now, the only way I can think of doing this is to > individually > > >> set > > >> >> each > > >> >> control to read only. This is tedious, but you don't have to > write a > > >> >> separate > > >> >> property command for each control -- just store a list of > controls in > > >> a > > >> >> comma > > >> >> delimited string and iterate over it with SSUB and WHILE. You > still > > >> have > > >> >> to > > >> >> maintain that string, however, whenever you add controls. > > > > >> >> You could also write some code that would parse the contents of > the > > >> >> sys_form_data column in the forms table and extract all the > control > > >> names. > > > > >> >> Here are three separate enhancements I can think of that would > make > > >> things > > >> >> easier: > > > > >> >> 1. A form level READ-ONLY property that would change the > property for > > >> all > > >> >> controls on the form (similar to the ENABLED property currently > > >> available, > > >> >> but > > >> >> without the problems you encountered). > > > > >> >> 2. A table level READ-ONLY property. You would still have to > apply > > >> this > > >> >> separately to each table on your form, but it would give you > the > > >> >> substantial > > >> >> advantage that you could now have additional levels of security > that > > >> would > > >> >> make > > >> >> one table on the form editable while the others would be read > only. > > > > >> >> 3. A form level variable RBTI_FORM_CONTROLS that would give you > the > > >> comma > > >> >> separated list of form controls that you could iterate over. > This > > >> would > > >> >> allow > > >> >> you to do anything you want with the controls. It would > probably be > > >> >> slower > > >> >> (since you would have to iterate over all the controls) and you > might > > >> run > > >> >> into > > >> >> a problem if you had lots of controls with long names since > even NOTE > > >> >> variables > > >> >> are limited to 4K of length. > > > > >> >> -- > > >> >> Larry > > > > > > > > Victor Timmons > Tiz's Door Sales, Inc > 425-258-2391 > >
