Dynamic Control Type Morphing

  • Thread starter Thread starter Jim Shaw
  • Start date Start date
J

Jim Shaw

BlankIs there a way to morph a control's type while the form is open in Form
View?

I know I can morph a control by modifying the controltype property in design
view, but I'm in a subform that has just entered in to new record mode and I
want to morph a text box into a combo box for the add and back to a text box
after the new record add.

I figure the requirement to close the form, reopen it in design view, make
the change and return to form view will get messy when executing the
morphing code in the form's code module. Seems to me the morphing code
needs to be external to the subject form.

I understand I can overlay two controls (text box and combo box) and flip
their visibility, but I think morphing would be a cleaner way to handle
this.

Thanks for your consideration of this question.
-Jim Shaw
 
I understand I can overlay two controls (text box and combo box) and flip
their visibility, but I think morphing would be a cleaner way to handle
this.

Hmm, my opinion is that toggling the visibility as "cleaner" and generally
accepted as "cleaner"...
Also when you are about to deploy your application , you should do this as
an mde, and you morphing thingy would work...
 
Andy;
I kinda thought it wouldn't work. However, I tend to work from an object
oriented perspective so I think morphing would be cleaner.

I'm thinking of an object that manages (or behaves as a border guard for) a
data element, both the way it is displayed and entered into the data base.
Splitting management across two objects does not fully encapsulate the
abstraction and spreads the code around in the form's code module.

I guess I don't understand why using two objects is "cleaner". I was hoping
there was another way to do this.


Oh! Well...Guess I'll use the visibility approach.

Thanks
-Jim
 
Back
Top