Folks, i need help with the following code, i have a form that collects data and is supposed process that data, after collecting data, i have a button that says "create Notes" much like 'Create Invoice' with the following code:
Code:
Private Sub cmdCreatePr_Notes_Click()
Dim ReferralID As Long
Dim ProcessID As Long
ReferralID = Nz(Me![Referral ID], 0)
' Gracefully exit if Process Notes already created
If ReferralDetails.IsProcessed(ReferralID) Then
If MsgBoxYesNo(ReferralAlreadyProcessed) Then
ReferralDetails.PrintReferralConfirmation ReferralID
End If
ElseIf ValidateReferral(Processed_ReferralDetails) Then
' Create Referral Record
If ReferralDetails.CreateConfirmation(ReferralID, 0, ProcessID) Then
' Mark all Referrals Referred
' Need to change Status to REFERRED from PENDING
Dim rsw As New RecordsetWrapper
With rsw.GetRecordsetClone(Me.sbfReferralDetails.Form.Recordset)
While Not .EOF
If Not IsNull(![Registry ID]) And ![Status ID] = Pending_ReferralStatus Then
rsw.Edit
![Status ID] = Processed_ReferralStatus
rsw.Update
Registry.PendingToReferred ![Registry ID]
End If
rsw.MoveNext
Wend
End With
' Print the PrintConfirmation
ReferralDetails.PrintReferralConfirmation ReferralID
SetFormState
End If
End If
End Sub
End Sub
But i get an error message that reads "Sub or Function not defined"
can anybody help please...