L
lmb0115
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" & " " &
[fldCustomer]
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" & " " &
[fldCustomer]