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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-Time Error '94'

Status
Not open for further replies.

inode

IS-IT--Management
May 7, 2004
1
US
Hi,

Help! All of a sudden my Visual Basic program gets the following error, Run-Time error '94' Invalid use of null. MS Access opens the database and compact/repair runs with no errors. Can I use MS Access or some other utility to find the null char that's causing the error?

Thanks...
 
Are you are encountering this error when trying to assign a Textbox or Label (or some other control) the value of a field from a recordset ?

If so maybe you can try testing for a Null value before making the assigninment.

Example

If IsNull(rsSample.Fields(1).value) = True then
TextBox1.Text = ""
Else
TextBox1.Text = rsSample.Fields(1).value
End If


If the above assumption is wrong then maybe you can try hadlling for the Error

Example

Sub Sample()
On Error Goto ErrorHandler

Your code here


ErrorHandler:
Select Case Err.Number
Case is = 94
'Resume Next 'or perform
'Some other custom handling here
Case Else
Msgbox Err.Number & " " & Err.Description
Resume Next
End Select
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top