On Thu, 2006-02-09 at 15:22 +0100, Frank Schönheit - Sun Microsystems Germany wrote: > Hi Matt, > > > I am learning to program macros to make a dynamic form for my database. > > I have an address table called tblAddresses and a form called > > frmAddressEntry. One field of the table, RecType, can have the values > > of "O" or "I" for Organization or Individual. If the record is "O", > > then the fname (first name) field is blank, and the Organization Name is > > stored in the lname (lastname field). I want the form to appear with > > only the lname control visible, covering the fname control, if the > > RecType is "O", and both fname and lname visible if RecType is "I". > > Also, if the RecType is changed, the visible fields should change > > accordingly. How do I do this? > > You hardly can :( > > Unfortunately, form controls don't have such a thing as a "visible" > attribute, so everything you'd do here would be quite some manual work. > How disappointing :(
> You could, depending on the RecType value > - enable or disable controls, and change label texts (not really what > you want) > - fiddle with the geometry information of the shapes to which the > controls belong > - use the control.getPeer().setVisible (IIRC) to kind of make the > control invisible, but this might have side effects (I'm not sure if the > control participates in the tabbing order, for instance) > Well, tabbing order would be a minimal problem. But, what do you mean by "kind of make..."? Can I make a control invisible, or can I not? > Not really satisfying, admittedly .... > > Ciao > Frank > I really appreciate your reply, Frank. Thanks! Matt --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
