alastair69
Registered User.
- Local time
- Today, 15:09
- Joined
- Dec 21, 2004
- Messages
- 560
Hello People,
I hope on this friday we are all feeling friendly and helpfull.
The code below is giving me an error of Object variable or With block variable not set (Error 91), on looking at the code i can see anything incorrect would you be able to point me in the right direction for help on this.
Code i am using is:-
Private Sub cmdEmail_Click()
Dim x, dbs As Database, strReportNo As String, strUser As String, strUpdateSQL As String
'x = fHandleFile("mailto:" & Me!ContactEmail, WIN_NORMAL)
strUser = User()
strReportNo = Me.ContactID
strUpdateSQL = "INSERT INTO [JT History] ( ClientID, HistoryDate, Description, UserID ) " & _
"VALUES ( '" & strReportNo & "', '" & Now() & "', 'E-Mailed', '" & strUser & "');"
dbs.Execute strUpdateSQL
End Sub
Please help if you can
Thanks
Alastair
UPDATE
******************************* RESOLVED THANKS TO ANTOMACK ***********************************
I hope on this friday we are all feeling friendly and helpfull.
The code below is giving me an error of Object variable or With block variable not set (Error 91), on looking at the code i can see anything incorrect would you be able to point me in the right direction for help on this.
Code i am using is:-
Private Sub cmdEmail_Click()
Dim x, dbs As Database, strReportNo As String, strUser As String, strUpdateSQL As String
'x = fHandleFile("mailto:" & Me!ContactEmail, WIN_NORMAL)
strUser = User()
strReportNo = Me.ContactID
strUpdateSQL = "INSERT INTO [JT History] ( ClientID, HistoryDate, Description, UserID ) " & _
"VALUES ( '" & strReportNo & "', '" & Now() & "', 'E-Mailed', '" & strUser & "');"
dbs.Execute strUpdateSQL
End Sub
Please help if you can
Thanks
Alastair
UPDATE
******************************* RESOLVED THANKS TO ANTOMACK ***********************************
Last edited: