K
Kim
I'm trying to keep track of expiry dates, so I can keep my
books up to date.
What I have is a Report that lists - Product, Company,
Expiry Date.
It is grouped by - Type, and Base.
The problem I'm having is when I try to pull up a report
that includes 2 'Bases' and 1 'Type', I get a report that
lists ALL the types related to the bases and then 1 or 2
page(s) that has all the proper Types for the two Bases
that I wanted the report on.
Because I'm finding this hard to explain, I'll try an
example:
Type1 Type2
------ -----
Red Purple
Blue Green
Yellow Orange
Base1 has:
Red, Blue, Purple & Orange (but does not have
Yellow or Green)
Base2 has:
Yellow & Green
Now, (I'm still fairly new to Access) in my logic, I would
assume that to call up both bases that are Type1, I would
need to ask for (Base1 OR Base2) AND Type1.
What I get is a report that has all the types related to
those 2 bases like the following:
Page 1 Page 2
----------- -----------
| Type1 | | Type2 |
| ----- | | ----- |
| Red | | Green |
| Blue | | |
| Yellow | | |
----------- -----------
Page1 is correct but page2 isn't.
the Formula (on the Format Event) I'm using is this
(there's more, but I want to keep this as simple as I can):
Dim stMsds As String
Dim stAssigned1 As String, stAssigned3 As String
Dim stType1 As String
stChild = "rptMsds"
stAssigned1 = "assigned = 1"
stAssigned3 = "assigned = 3"
stType1 = "type = 1"
stLg = stAssigned1 + " or " + stAssigned2
If Me.lstReports = "VIH Logging - Fuels" Then
DoCmd.OpenReport stMsds, acPreview, , stType1 + "
and " + stLg
End If
Can anyone help me figure out why I'm getting the extra
data in my report, and what I would do to correct it?
Many thanks in advance.
books up to date.
What I have is a Report that lists - Product, Company,
Expiry Date.
It is grouped by - Type, and Base.
The problem I'm having is when I try to pull up a report
that includes 2 'Bases' and 1 'Type', I get a report that
lists ALL the types related to the bases and then 1 or 2
page(s) that has all the proper Types for the two Bases
that I wanted the report on.
Because I'm finding this hard to explain, I'll try an
example:
Type1 Type2
------ -----
Red Purple
Blue Green
Yellow Orange
Base1 has:
Red, Blue, Purple & Orange (but does not have
Yellow or Green)
Base2 has:
Yellow & Green
Now, (I'm still fairly new to Access) in my logic, I would
assume that to call up both bases that are Type1, I would
need to ask for (Base1 OR Base2) AND Type1.
What I get is a report that has all the types related to
those 2 bases like the following:
Page 1 Page 2
----------- -----------
| Type1 | | Type2 |
| ----- | | ----- |
| Red | | Green |
| Blue | | |
| Yellow | | |
----------- -----------
Page1 is correct but page2 isn't.
the Formula (on the Format Event) I'm using is this
(there's more, but I want to keep this as simple as I can):
Dim stMsds As String
Dim stAssigned1 As String, stAssigned3 As String
Dim stType1 As String
stChild = "rptMsds"
stAssigned1 = "assigned = 1"
stAssigned3 = "assigned = 3"
stType1 = "type = 1"
stLg = stAssigned1 + " or " + stAssigned2
If Me.lstReports = "VIH Logging - Fuels" Then
DoCmd.OpenReport stMsds, acPreview, , stType1 + "
and " + stLg
End If
Can anyone help me figure out why I'm getting the extra
data in my report, and what I would do to correct it?
Many thanks in advance.