Here is my dilema.....
Out wonderful IT department decided to upgrade our PC to Windows XP and Access 2000 (9.0.3821 SR-1). This has caused several issues with some previously working code. When the following code is run it stops on the first line and hilights the word left and gives the message "can't find project or library". Can anyone tell me what is missing, I'm thinking access is not fully installed. Here is the code....
------------------------------------------------------------
Dim strMsg As String
Dim strApprovalNumber As String
If IsNull(Me![txtCurrentUser]) Or IsNull(Me![txtCaseNumber]) Or IsNull(Me![txtDate]) Then
strMsg = MsgBox("You have not supplied a case number.", vbOKOnly, "Missing Data"
Exit Sub
End If
' First Name Initial
strApprovalNumber = Left(Me![txtCurrentUser], 1)
' Last Name Initial
strApprovalNumber = strApprovalNumber & Mid(Me![txtCurrentUser], InStr(1, Me![txtCurrentUser], " " + 1, 1)
' Last Four Of Case Number
strApprovalNumber = strApprovalNumber & CStr(Right(Me![txtCaseNumber], 4))
' Last Two Of Year
strApprovalNumber = strApprovalNumber & CStr(Format(Me![txtDate], "yy")
' Random Four Digits
'Randomize
strApprovalNumber = strApprovalNumber & CStr(Format(Int((9999 - 0 + 1) * Rnd + 0), "0000")
Me![Text69] = strApprovalNumber
End Sub
Out wonderful IT department decided to upgrade our PC to Windows XP and Access 2000 (9.0.3821 SR-1). This has caused several issues with some previously working code. When the following code is run it stops on the first line and hilights the word left and gives the message "can't find project or library". Can anyone tell me what is missing, I'm thinking access is not fully installed. Here is the code....
------------------------------------------------------------
Dim strMsg As String
Dim strApprovalNumber As String
If IsNull(Me![txtCurrentUser]) Or IsNull(Me![txtCaseNumber]) Or IsNull(Me![txtDate]) Then
strMsg = MsgBox("You have not supplied a case number.", vbOKOnly, "Missing Data"
Exit Sub
End If
' First Name Initial
strApprovalNumber = Left(Me![txtCurrentUser], 1)
' Last Name Initial
strApprovalNumber = strApprovalNumber & Mid(Me![txtCurrentUser], InStr(1, Me![txtCurrentUser], " " + 1, 1)
' Last Four Of Case Number
strApprovalNumber = strApprovalNumber & CStr(Right(Me![txtCaseNumber], 4))
' Last Two Of Year
strApprovalNumber = strApprovalNumber & CStr(Format(Me![txtDate], "yy")
' Random Four Digits
'Randomize
strApprovalNumber = strApprovalNumber & CStr(Format(Int((9999 - 0 + 1) * Rnd + 0), "0000")
Me![Text69] = strApprovalNumber
End Sub