By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

How to save a record, help needed

P: n/a
Help
I need to save the current record before sending a simple report from it as
an email using an event. The following code works for old records but not
for the current new one:
------
Private Sub Command254_Click()
On Error GoTo Err_Command254_Click

Dim stDocName As String

???do i need some form of save command in her, similar to update
record?? If so how?

stDocName = "Confirmation"

DoCmd.SendObject acSendReport, stDocName, "rich text format", [DEMANDING
OFFICER], , , "Vacuum Processing Job details", "Please see the enclosed Word
document for details of your job "

Exit_Command254_Click:
Exit Sub

Err_Command254_Click:
MsgBox Err.DESCRIPTION
Resume Exit_Command254_Click
End Sub
------

I assume I need to save the current record at or about the ??? but can not
see how to do it, can anybody help please?
Tom
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Tom Weston wrote:
Help
I need to save the current record before sending a simple report from
it as an email using an event. The following code works for old
records but not for the current new one:


Add one lie before your SendObject line...

Me.Dirty = False

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
"Tom Weston" <t.********@dl.ac.uk> wrote in message
news:d8**********@blackmamba.itd.rl.ac.uk...
Help
I need to save the current record before sending a simple report from it
as
an email using an event. The following code works for old records but not
for the current new one:
------
Private Sub Command254_Click()
On Error GoTo Err_Command254_Click

Dim stDocName As String

???do i need some form of save command in her, similar to update
record?? If so how?

stDocName = "Confirmation"

DoCmd.SendObject acSendReport, stDocName, "rich text format",
[DEMANDING
OFFICER], , , "Vacuum Processing Job details", "Please see the enclosed
Word
document for details of your job "

Exit_Command254_Click:
Exit Sub

Err_Command254_Click:
MsgBox Err.DESCRIPTION
Resume Exit_Command254_Click
End Sub
------

I assume I need to save the current record at or about the ??? but can not
see how to do it, can anybody help please?
Tom

Assuming this is a normal bound form, then:

If Me.Dirty=True Then
Me.Dirty=False
End If

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.