Sendobject macro



I would like to add a field from a form to the subject line of a send macro.
The following actions occur before the send macro is run.
Set rsLookUp = Nothing
Set cnCurrent = Nothing
DoCmd.GoToRecord , , acNewRec
DoCmd.OpenQuery "qryAppMaterialsTOPermMaterials", acViewNormal
DoCmd.RunMacro "macSendNewHoldReport"
DoCmd.OpenReport "rptscrapinvestigation", acViewNormal
DoCmd.OpenReport "rptReworkResultsPage", acViewNormal
DoCmd.OpenReport "rptMaterialMovementForm", acViewPreview
DoCmd.OpenReport "rptMaterialMovementForm", acViewNormal
DoCmd.Close acForm, "frmMaterialMovement", acSaveYes
DoCmd.OpenQuery "qryDeltblMaterials", acViewNormal

I am a novice at this but from what I can tell, because the form goes to a
new record on the form(which is blank) it can't see the fldCustomer that I
would like to include in the subject line because the new record is blank.
How can I look at the fldCustomer from the previous record and add that to my
Subject field prior to sending the macro? I currently have the following
information in the subject line of the SendObject macro: ="New Hold" & " " &



Steve Schapel


I suppose the easiest solution would be to remove the DoCmd.GoToRecord , ,
acNewRec line from your code, or move it to after the RunMacro. Any reason
why that won't work?

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