Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

Help with this email code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
acs68 - 08 Apr 2005 03:35 GMT
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------------------
acs68 - 08 Apr 2005 03:50 GMT
Please ignore my post, found that I had a text field that was doing a
dlookup on a table that didn't exist :(

cheers,

Adam

> Hi all,
>
[quoted text clipped - 53 lines]
> End If
> ------END CODE------------------
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.