I have 2 forms in my project I am using vb. One form is sales and other is MainConn
I have written one function in MainConn form.
I am calling this function from sales form by writting code:
frmMainConn.Res et_Fields(Me)
But above code doesnot work.
1) I am getting an error:Type mismatch.
2) When i type objctl in Reset_Fields function, pop up window doesnt come i.e. Text Property.
What is the solution? Can u tell me what is the correct code.Plz help me soon.
I have written one function in MainConn form.
Code:
Dim ctl as control
Public Sub Reset_Fields(ByVal frm As Form)
For Each objctl In frm.Controls
If UCase(TypeName(objctl)) = "TEXTBOX" Then
objctl.Text = ""
End If
Next
End Sub
frmMainConn.Res et_Fields(Me)
But above code doesnot work.
1) I am getting an error:Type mismatch.
2) When i type objctl in Reset_Fields function, pop up window doesnt come i.e. Text Property.
What is the solution? Can u tell me what is the correct code.Plz help me soon.
Comment