RonnieODIN
Registered User.
- Local time
- Today, 14:17
- Joined
- Jun 15, 2012
- Messages
- 46
Hi,
I am having some trouble getting my report work correctly.
I have a report, repKomp, based on some sub-reports which are based on queries. I have two criterias for the queries - the same two for all - saying that two FK's must be filtered on a variable, Mask and Komp respectively.
I want to open the report when clicking a button on my form. The variables are also defined here.
The report is opened but first I have to reassign the values for the variables twice for each sub-report. I do not get why the report doesn't work.
Hope that someone could please help me.
My code is:
I am having some trouble getting my report work correctly.
I have a report, repKomp, based on some sub-reports which are based on queries. I have two criterias for the queries - the same two for all - saying that two FK's must be filtered on a variable, Mask and Komp respectively.
I want to open the report when clicking a button on my form. The variables are also defined here.
The report is opened but first I have to reassign the values for the variables twice for each sub-report. I do not get why the report doesn't work.
Hope that someone could please help me.
My code is:
Code:
Mask = Me.MaskineID
Komp = Me.KtlFane45 + 1
Me!Tekst143 = Mask
Me!Tekst145 = Komp
DoCmd.OpenReport "repKomp", acViewPreview, , "MaskineID = [Forms]![frmInfoMaskiner]![MaskineID]", acDialog