Forum Discussion
marklbdrummer
Jan 17, 2024Copper Contributor
What am i doing wrong? Tring to send an access email using VBA. below is the code i am using. Dim strToWhom As String Dim strCcWhom As String Dim strMsgBody As String Dim strSubject As St...
XPS35
Jan 18, 2024Iron Contributor
What is your problem? Do you get an error message? Is the code not working as expected? Or........
- marklbdrummerJan 18, 2024Copper Contributor
- Jan 18, 2024
Hi,
The code in the picture looks different from the one you posted. Generally:
You have several field/control names that contain spaces. You have to surround all these names with square brackets, e.g.
& Me.[3 Card Poker2] & " " & Me.[3 Card Poker3]
The & in red is also missing in your posted code.
When you post long code here, try to use the code formatting icon on the far right of the editor menu bar.
Servus
Karl
****************
Access Forever
Access News
Access DevCon
Access-Entwickler-Konferenz AEK- marklbdrummerJan 18, 2024Copper Contributor
- marklbdrummerJan 18, 2024Copper Contributor
- XPS35Jan 18, 2024Iron Contributor
I see several fieldnames with spaces. Put those between square brackets.
For example: Me.[Let it Ride2]