Need Help

mmb

Active member
Joined
Aug 1, 2004
Messages
42
Programming Experience
1-3
First Question :
I am getting this error in ..

[Microsoft][ODBC Microsoft Access Driver] Could not find file'(unknown)'

I have made a DSN through File System. I have added a reference of ADODB. At connection open I get this above error msg. However DSN is made.

Second Question :

What is the equivalent code for
Screen.Activefrom.Controls
I want to change the below vb 6 code to vb.net. I am just stuck with this Screen.Activefrom.Controls

Public Function ResetFormControls()
Dim Cnt As Control
For Each Cnt In Screen.ActiveForm.Controls
If TypeOf Cnt Is TextBox Then
If Cnt.TabIndex > 0 Then Cnt.Text = Empty
end if
Next
End Function
 
to change that in .net...
try this way.
VB.NET:
 dim c as control
 for each c in me.controls
 	if typeof c is textbox
 		c.text = string.empty
 	end
 next
 
Back
Top