1) Put Option Explicit at the top of the module.
2) Locate the functions "CheckReq()" and "FileReq()" and the procedure "SaveSetting". They would be my first guesses at what Access can't find. (Probably the answer to your technical question.)
3) For CRLF, you can use the constant vbCRLF.
4) For string concatenation, it's a better habit to use the & operator rather than the + operator. It's less ambiguous to read when using two variables next to each other.
5) the line continuation character (_) is your friend for making code like this most readable.
Code:
Option Explicit
Private Sub CBPrintReq_Click()
On Error GoTo SendPrintError
Dim NewID As String
Dim Notice As String
Dim Temp
Notice = "You are requesting to print the request Instead of " & _
"sending it to the Systems staff. Please note that " & _
"if you wish to continue with this request, you will " & _
"need to obtain your manager's signature on the " & _
"printout, and turn the request into systems. " & vbCRLF & _
"Do you still wish to print out this request? " & _
If MsgBox(Notice, 4 + 48 + 256, "Print Request") = 6 Then
'Check for valid fields
If CheckReq() Then
'Add the request to the database
NewID = FileReq(1)
'Print Request
If PrintReq(NewID) Then
MsgBox "Your Request has been printed. Please have your request" & vbCRLF & _
"signed by your manager, then deliver it to the Systems staff inbox." & vbCRLF & _
"Your Request ID Number is: " & NewID
'Update Ini File
SaveSetting "TSystems", "WorkRequest", "LastRequester", Me.Requester
SaveSetting "TSystems", "WorkRequest", "LastID", NewID
'Close the form and return to the Main Menu
DoCmd.Close
End If
End If
End If
SendPrintExit:
Exit Sub
SendPrintError:
MsgBox "A critical error has occurred. " & _
"Please notify Systems at 3-0970 immediately." & vbCRLF & _
"Error identifier: WorkReq.CBPrintReq_Click"
MsgBox Error$
Resume SendPrintExit
End Sub
NOTE - if you put the word CODE in square brackets [] before your code, and /code after, then the forum will preserve your formatting.