Edit a command in a form

M

Martin Hopkins

Hello,

I have a databas that is used around several areas around the country,
independantly. I wish to roll out a new version in Access 2000 and so far
all is well. The systems are not linked in any way.

I have constructed a default database that each site can populate with its
own data. One of the operatinos of the system is for any site user to rasie
a repair request and email it to their own repair cell. This is carried out,
using the event procedure as follows:

Private Sub Command43_Click()
On Error GoTo Err_Command43_Click

'---------------------------------------------
'Save the current record
'Send email with Snapshot attached
'Enter Demand No into subject line of email
'----------------------------------------------

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.SendObject acReport, "RepRepairRequest", "SnapshotFormat(*.snp)",
(e-mail address removed), "", "", "Repair " & " " & Me.repairrequest_No, "A
Request has been received. Open the attachment and print for your Records.
Action the request on the database using the Unique Repair number No",
False, ""
DoCmd.OpenReport "RepRepairRequest", acNormal, "", ""

Exit_Command43_Click:
Exit Sub

Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click

End Sub

This is find at my site but the email address is different for each site.

Is there a way of setting up the change of email address
(e-mail address removed) to anything else via a form input??? Or if there any
way of asking for the default email address on the first instance of runing
the script and the script being amended.?

A long shot I think, but any help would be greatly appreciated.

Martin Hopkins
 
M

Martin Hopkins

Sorry,

But I do not see how I can do this using the script below which is a event
procedure on the click of a control button:
Private Sub Command43_Click()
On Error GoTo Err_Command43_Click

'---------------------------------------------
'Save the current record
'Send email with Snapshot attached
'Enter Demand No into subject line of email
'----------------------------------------------

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.SendObject acReport, "RepRepairRequest", "SnapshotFormat(*.snp)",
(e-mail address removed), "", "", "Repair " & " " & Me.repairrequest_No, "A
Request has been received. Open the attachment and print for your Records.
Action the request on the database using the Unique Repair number No",
False, ""
DoCmd.OpenReport "RepRepairRequest", acNormal, "", ""

Exit_Command43_Click:
Exit Sub

Err_Command43_Click:

Do I still need to use this function? Could you please assit me further.

Martin Hopkins
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top