I want to create a command button in my petty cash reimbursement from in order to send email to the person who can pick up their money. I would like the email system pick up the staff name from the Staff table.
The codes I write in cboClaimName are as following:

Private Sub cboClaimName_AfterUpdate()

Dim db As Database
Dim rsStaff As Recordset
Dim strCBOMatch As String

ClaimNumber = DMax("ClaimNumber", "tblClaim") + 1

Set db = CurrectDb
Set rsStaff = db.OpenRecordset("tblStaff", dbOpenDynaset)

strCBOMatch = "[StaffID]=" & cboClaimName
rsStaff.FindFirst strCBOMatch
Me.txtStaffName = rsStaff!StaffName

End Sub

The code in cmdemail is as following:

Private Sub cmdemail_Click()

On Error GoTo Err_cmdemail_Click
Dim db As Database
Dim rsClaimDetails As Recordset
Dim rsClaim As Recordset
Dim ReimID As Long
Dim ClaimNumber As Integer
Dim ClaimName As String
Dim ClaimTotal As Currency
Dim rsStaff As Recordset

Dim strToWhom As String
Dim strToWhomFirst As String
Dim strToNormBC As String
Dim strSubject As String
Dim strMsgBody As String

Set db = CurrentDb
Set rsClaimDetails = db.OpenRecordset("tblClaimDetails", dbOpenDynaset)

strToWhom = Me.txtStaffName
strToWhomFirst = Me.txtStaffName
strToNormBC = "Raewyn Larsen"
strSubject = "Petty Cash"
strMsgBody = "Hi,the petty cash is ready to be collected from Ops Services. Thanks"

DoCmd.SendObject , , , strToWhom, strToNormBC, strSubject, strMsgBody
DoCmd.Close acForm, "frmPettyCashReimbursement"

Exit Sub

MsgBox Err.Description
Resume Exit_cmdemail_Click

End Sub

The problem is that Access couldn’t find txtStaffName, the message said
Compile error: Method or data member not found
Can anyone please help me to find out where problem is?