Invalid use of Null

D

devfrag

I have recently upgraded a users desktop to Office XP from Office 2000 and
it's generating the following error after the upgrade.

Run-time error '94'

Invalid use of Null

I looked at the form in design view and found the following code for the
On_Click procedure.

Begin code...
Private Sub cmdRegistration_Click()
On Error GoTo Err_cmdRegistration_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmRegistrationMain"

stLinkCriteria = "[IDClassSched]=" & Me![IDClassSched]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdRegistration_Click:
Exit Sub

Err_cmdRegistration_Click:
MsgBox Err.Description
Resume Exit_cmdRegistration_Click

End Sub
End code...

Perhaps this isn't all of the information needed to solve this problem, but
I hope someone can point me in the right direction as I'm not a programmer,
just the network admin trying to help out.

Thanks
 
K

Ken Snell [MVP]

When does the error occur? We need more info about what is happening in the
database when the error message occurs. It could be in the code that you
posted, it could be in the record source of the form that is being opened,
or somewhere else.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top