Connecting Tech Pros Worldwide Forums | Help | Site Map

how to enter data in only one textbox in the form

Member
 
Join Date: Mar 2007
Posts: 44
#1: May 6 '07
sir,
i have a form created by using a table.In the form load event,i wrote
me.allowedits=false
me.allowadditions=false
me.allowdeletions=false

now i am unable to enter data in the text boxes in the form.
But i want to enter data in only one textbox named questionno in the form
How to do this.
please help me.

JConsulting's Avatar
Expert
 
Join Date: Apr 2007
Location: Houston
Posts: 601
#2: May 6 '07

re: how to enter data in only one textbox in the form


re-enable your form
run this in the form's on_open event

Expand|Select|Wrap|Line Numbers
  1. Dim c As control
  2. For Each c In Me.Controls
  3. If c.controlType = acTextBox Or c.controlType = acComboBox Or c.controlType = acCheckBox Then
  4. strName = c.Name
  5.     If c.Name = "mytextbox" Then
  6.         c.Enabled = True
  7.     Else
  8.         c.Enabled = False
  9.     End If
  10. End If
  11. Next c

this will enable only your textbox
Reply