Lanason
Registered User.
- Local time
- Today, 00:49
- Joined
- Sep 12, 2003
- Messages
- 258
Morning guys
I have a routine that sends scheduled emails.
It runs down a list of records (Myrec1) and runs those that need to be run. A parameter is set for selection criteria in a query.
Some emails then have a sub routine loop (Myrec2) that then sends personalised emails to selected people rather than a generic email.
I have two issues
1) Testing the sub loop using a fixed field name (Owner) to send to owners but I cannot get the right syntax for the quotation marks "
GBL_stLinkCriteria = "'Owner = '" & myrec2![Owner] & "''"
Can anyone help with the syntax?:banghead:
Secondly:
2) I want to pick up the name of the field as a variable from the sub routine data (myrec2) so that the Owner (above) field can be a variable - something like . . . .
GBL_stLinkCriteria - "'" & myrec1![stLinkCriteria] & " = '[" & myrec2![VariableName] & "]'"
Again can anyone help with the syntax?:banghead:
I have a routine that sends scheduled emails.
It runs down a list of records (Myrec1) and runs those that need to be run. A parameter is set for selection criteria in a query.
Some emails then have a sub routine loop (Myrec2) that then sends personalised emails to selected people rather than a generic email.
I have two issues
1) Testing the sub loop using a fixed field name (Owner) to send to owners but I cannot get the right syntax for the quotation marks "
GBL_stLinkCriteria = "'Owner = '" & myrec2![Owner] & "''"
Can anyone help with the syntax?:banghead:
Secondly:
2) I want to pick up the name of the field as a variable from the sub routine data (myrec2) so that the Owner (above) field can be a variable - something like . . . .
GBL_stLinkCriteria - "'" & myrec1![stLinkCriteria] & " = '[" & myrec2![VariableName] & "]'"
Again can anyone help with the syntax?:banghead: