Textbox Expansion

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,
I have a command button, and when the user clicks the command button a text
box is automatically added to the form. If the user clicks this button again,
another text box is added below the one previously added.

Is it possible to do this without me creating infinite textboxes prior to
the runtime of the form?

Thanks
 
I gave this a shot, but didnt work.

Dim ctlName As Control

'This doesnt seem to work in Access
Set ctlName = frmDIRUpdate.Controls.Add("VB.TextBox", "txtAction",
frmDIRUpdate)

ctlName.Visible = True

ctlName.Top = txtActions.Top + txtActions.Height
 
The texboxes are used to store comments, and in a lot of the cases, multiple
comments are needed. But there isnt a need to have more than one "comment"
box active, therefore, if the user clicks the button (next comment...for
example) then another textbox(used for comment entry) is made.

Cheers
 
Hey Rob,
Any chance you could go into more detail as to how I could make a form that
would supply the user with X number of textboxes (after the button is
clicked, a textbox would be shown).

Thanks again.
-MK-
 
Back
Top