Hi, I ma trying to find away to check is a textbox on a form in null then I want to put a certain value in there. Actually I have about 15 of these text boxes. Therefore I am trying to use a variable and as the for loop go through each one, it checks to see if the box is null, and if it is it will put a certain value is there. The problem that I am having is concatenating the variable to the form object. I have a form called Form1 and two Textboxes called text0 and Text1.
Any ideas I really will appreciate.
Thank you
Here is what I am tring on a simple version of this:
Private Sub Command4_Click()
Dim x As String
Dim Frm1 As Form_Form1
Dim i As Integer
i = 1
x = ""
For i = 1 To 2
x = CStr(x) & i
If IsNull("Me.Text" & x & ".Value") = True Then
Frm1.Text & x & ".Value" = "PP"
End If
Next i
End Sub
Any ideas I really will appreciate.
Thank you
Here is what I am tring on a simple version of this:
Private Sub Command4_Click()
Dim x As String
Dim Frm1 As Form_Form1
Dim i As Integer
i = 1
x = ""
For i = 1 To 2
x = CStr(x) & i
If IsNull("Me.Text" & x & ".Value") = True Then
Frm1.Text & x & ".Value" = "PP"
End If
Next i
End Sub