Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data control

Status
Not open for further replies.

jrlbw

Programmer
Jun 27, 2002
15
US
I have a form with a data control named data1. somehow there is a data2 on the form. I cannot find it. Using F2 listing objects, there is a data2. Looking at the code for the form, there is a data2 sub .....
How can I find the control?
thanks
 
It's probably located somewhere outside of the form borders. Use the property window and set Data2.Left = 0 and Data2.Top = 0, and this will move it to the top left of your form.

Robert
 


Or what you can do is to select F4, or any other ways where you can bring up your property window. In the drop down list of your property window, select data2, and it will automatically "highlight" data2 on your form.

-- Wendy
 
I have written this cdoe for my database,

Private Sub Text333_KeyPress(KeyAscii As Integer)
If KeyAscii = 48 Then
DoCmd.Close acForm, "Medication Problems", acSaveYes
DoCmd.OpenForm "Medication Problems (Short Form)"
ElseIf KeyAscii = 49 Then
Text335.SetFocus
ElseIf KeyAscii = 50 Then
Text335.SetFocus
ElseIf KeyAscii = 51 Then
Text335.SetFocus
End If
End Sub

When I try to execute the code in my form, the numbers don't show up in the text box. For instance, when I press "1" on the keyboard, the cursor just go's to the next control, Text335, and the number "1" doesn't show up in Text333, can someone help me figure ou how to get the numbers to show up in Text333. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top