A
acs68
Hi all,
I had a working app that I went in and renamed all the tables and forms etc.
Now a button on my app won't work and comes up with the error:
"An expression you entered is the wrong data type for one of the arguments"
Does anyone know what could be causing this ? I'm stumped. I've compacted
and repaired and tried importing all the objects into a new database. I just
can't see what would be causing this as it was working fine before renaming
the tables/queries and forms.
thanks in advance.
Adam
The code in question is:
----START CODE ------
On Error GoTo Err_btnSaveEmail_Click
Dim emailbody As String
Dim lf As String
lf = Chr(13) & Chr(10)
emailbody = ""
emailbody = emailbody & "Request Taken By: " & Me!ReqTakenBy & lf
emailbody = emailbody & "Action Officer: " & Me!ReqActionOfficer & lf
emailbody = emailbody & "Request Date/Time: " & Me!ReqDate & lf & lf
emailbody = emailbody & "Requester's Details - Name: " &
Me!ReqRequesterSurname & ", " & Me!ReqRequesterGivenNames & lf
emailbody = emailbody & "Requester's Details - Address: " &
Me!ReqRequesterAddStreet & ", " & Me!ReqRequesterAddSuburb & " " &
Me!ReqRequesterAddPostCode & lf
emailbody = emailbody & "Requester's Details - Phone: " &
Me!ReqRequesterPhone & lf
emailbody = emailbody & "Requester's Details - Mobile: " &
Me!ReqRequesterMobile & lf
emailbody = emailbody & "Requester's Details - Email: " &
Me!ReqRequesterEmail & lf & lf
emailbody = emailbody & "Category: " & Me!ReqCategory & lf & lf
emailbody = emailbody & "Full Detail: " & Me!ReqDetails & lf
MsgBox emailbody
If [Forms]![reqfrmRequestsTelephoneMsg]![ReqId] > 0 Then
DoCmd.SendObject , , , Me!txtAOEmail, , , "#" & Me!ReqId ' & "
Customer Request " & " - " & Me!ReqCategory, "" & emailbody & ""
DoCmd.Close
Else
MsgBox "There isn't enough Information to e-mail this request", 32
End If
------END CODE------------------
I had a working app that I went in and renamed all the tables and forms etc.
Now a button on my app won't work and comes up with the error:
"An expression you entered is the wrong data type for one of the arguments"
Does anyone know what could be causing this ? I'm stumped. I've compacted
and repaired and tried importing all the objects into a new database. I just
can't see what would be causing this as it was working fine before renaming
the tables/queries and forms.
thanks in advance.
Adam
The code in question is:
----START CODE ------
On Error GoTo Err_btnSaveEmail_Click
Dim emailbody As String
Dim lf As String
lf = Chr(13) & Chr(10)
emailbody = ""
emailbody = emailbody & "Request Taken By: " & Me!ReqTakenBy & lf
emailbody = emailbody & "Action Officer: " & Me!ReqActionOfficer & lf
emailbody = emailbody & "Request Date/Time: " & Me!ReqDate & lf & lf
emailbody = emailbody & "Requester's Details - Name: " &
Me!ReqRequesterSurname & ", " & Me!ReqRequesterGivenNames & lf
emailbody = emailbody & "Requester's Details - Address: " &
Me!ReqRequesterAddStreet & ", " & Me!ReqRequesterAddSuburb & " " &
Me!ReqRequesterAddPostCode & lf
emailbody = emailbody & "Requester's Details - Phone: " &
Me!ReqRequesterPhone & lf
emailbody = emailbody & "Requester's Details - Mobile: " &
Me!ReqRequesterMobile & lf
emailbody = emailbody & "Requester's Details - Email: " &
Me!ReqRequesterEmail & lf & lf
emailbody = emailbody & "Category: " & Me!ReqCategory & lf & lf
emailbody = emailbody & "Full Detail: " & Me!ReqDetails & lf
MsgBox emailbody
If [Forms]![reqfrmRequestsTelephoneMsg]![ReqId] > 0 Then
DoCmd.SendObject , , , Me!txtAOEmail, , , "#" & Me!ReqId ' & "
Customer Request " & " - " & Me!ReqCategory, "" & emailbody & ""
DoCmd.Close
Else
MsgBox "There isn't enough Information to e-mail this request", 32
End If
------END CODE------------------