I've been thinking and trying on this for over 6 hours and yet I think the solution is simple.
Problem is that I have to print a PDF and use that file to email it to the corresponding email. Everything works fine except this one little thing.
The thing is that the stLinkCriteria won't recognize the linking field cause it's in a sub-form. So it keeps asking to fill in the parameter by hand.
I think I tried a lot of variaties, if the linking field isn't in a sub-form there is no problem to get it to work.
So what am I missing here, is it even possible to get it out of a sub-form?
info: form: [IK09:Subbestelbon]
sub-form: [IK09A
rijsaanvragen]
linking field: [AANVRAAG_ID] which is on the sub-form
Here is one of the versions I tried but did not work.
Problem is that I have to print a PDF and use that file to email it to the corresponding email. Everything works fine except this one little thing.
The thing is that the stLinkCriteria won't recognize the linking field cause it's in a sub-form. So it keeps asking to fill in the parameter by hand.
I think I tried a lot of variaties, if the linking field isn't in a sub-form there is no problem to get it to work.
So what am I missing here, is it even possible to get it out of a sub-form?
info: form: [IK09:Subbestelbon]
sub-form: [IK09A

linking field: [AANVRAAG_ID] which is on the sub-form
Here is one of the versions I tried but did not work.
Code:
stLinkCriteria = "[IKSUB_PRIJSAANVRAGEN].[AANVRAAG_ID]=Forms![IK09A:Prijsaanvragen]![AANVRAAG_ID]"
Call Printen_LadePdfsav("IK09:PrijsaanvraagPDF", stLinkCriteria)