acCmdChangeToTextBox

  • Thread starter Thread starter Edward Rothwell
  • Start date Start date
E

Edward Rothwell

I am trying to change a combobox to a textbox in VBA on form in design
mode.

I have a number of controls on the form

cntrl1
cntrl2
cntrl3

My question is how do I select the control before applying the change.

Private Sub MyChangeControlType()

'What goes here before calling the following??

RunCommand acCmdChangeToTextBox

End Sub
 
Hi Allen,

Thanks for that - it works just great.

One thing I discovered was that for what I want to work I have to make
the calls in the right order, otherwise Access thows a 2467
Application Error.

If I do:

ctrl.ControlType = bytControlType
ctrl.Name = strQualifierName

....I get the error.

If I do:

ctrl.Name = strQualifierName
ctrl.ControlType = bytControlType

....everything works just great :-)

Thanks again.

Ed.
 
Back
Top