A
AHopper
On a form "UniqueLabelReportDialogBox" I have unbound
combo boxes that I want to use for criteria when printing
a report. The user creates the range by selecting from the
combo box list in two combo boxes "OneStartUnique"
and "EndUniqueLabel".
The problem I have is with printing a range between
[OneStartUnique] and [EndUniqueLabel]. The data table only
has a field called "UniqueLabel".
I have tried the following code in the On Click event of a
commmand button on the "UniqueLabelReportDialogBox" form
Dim stDocName As String
stDocName = "OnePackagedUniqueLabelReport"
DoCmd.OpenReport stDocName, acNormal, , "[UsedWithJob]=
[Forms]![UniqueLabelReportDialogBox]![JobNumber]And
[UniqueLabel]>=[Forms]![UniqueLabelReportDialogBox]!
[OneStartUnique]And [UniqueLabel]<=[Forms]!
[UniqueLabelReportDialogBox]![EndUniqueLabel]"
[UsedWithJob]and [UniqueLabel] are both in the source for
the report as seen below:
SELECT DISTINCTROW OneGPackData.JobNumber,
Jobs.ItemNumber, Jobs.ItemName, OneGPackData.UsedWithJob,
OneGPackData.UniqueLabel, Sum(OneGPackData.GoodOnePack) AS
[Sum Of GoodOnePack], OneGPackData.Surplus,
OneGPackData.PartialOnePack
FROM Jobs INNER JOIN OneGPackData ON Jobs.JobNumber =
OneGPackData.JobNumber
GROUP BY OneGPackData.JobNumber, Jobs.ItemNumber,
Jobs.ItemName, OneGPackData.UsedWithJob,
OneGPackData.UniqueLabel, OneGPackData.Surplus,
OneGPackData.PartialOnePack;
Thank you for your help
Allan
combo boxes that I want to use for criteria when printing
a report. The user creates the range by selecting from the
combo box list in two combo boxes "OneStartUnique"
and "EndUniqueLabel".
The problem I have is with printing a range between
[OneStartUnique] and [EndUniqueLabel]. The data table only
has a field called "UniqueLabel".
I have tried the following code in the On Click event of a
commmand button on the "UniqueLabelReportDialogBox" form
Dim stDocName As String
stDocName = "OnePackagedUniqueLabelReport"
DoCmd.OpenReport stDocName, acNormal, , "[UsedWithJob]=
[Forms]![UniqueLabelReportDialogBox]![JobNumber]And
[UniqueLabel]>=[Forms]![UniqueLabelReportDialogBox]!
[OneStartUnique]And [UniqueLabel]<=[Forms]!
[UniqueLabelReportDialogBox]![EndUniqueLabel]"
[UsedWithJob]and [UniqueLabel] are both in the source for
the report as seen below:
SELECT DISTINCTROW OneGPackData.JobNumber,
Jobs.ItemNumber, Jobs.ItemName, OneGPackData.UsedWithJob,
OneGPackData.UniqueLabel, Sum(OneGPackData.GoodOnePack) AS
[Sum Of GoodOnePack], OneGPackData.Surplus,
OneGPackData.PartialOnePack
FROM Jobs INNER JOIN OneGPackData ON Jobs.JobNumber =
OneGPackData.JobNumber
GROUP BY OneGPackData.JobNumber, Jobs.ItemNumber,
Jobs.ItemName, OneGPackData.UsedWithJob,
OneGPackData.UniqueLabel, OneGPackData.Surplus,
OneGPackData.PartialOnePack;
Thank you for your help
Allan