T
TotallyConfused
As I mentioned before, I inherited a db and I am trying to figure it out.
Not sure I did a good job of explaining myself the first time. But I really
need help with this. The one change I have to make is to add 2010 dates and
let user choose 2009 or 2010 or both. This db only has 2009 dates. I tried
to add 2010 dates and although it lets me enter 2010 dates it does not show
2010 dates when I run the report.
The first form (frm1) opens it has two command buttons. You choose one or
the other than another form (frm 2) opens. When this forms opens,it opens
with a single combo box where you can pick any month from January through
December. Once you choose the month, command buttons appear. One to view
report. When you click on the view report command you can view all of the
dates for the month you choose.
Frm 2 has the following code that call the combo box and (invisible) text
boxes in this form. This code houses the dates as follows:
Private Sub Comp50 BeforeUpdate(Cancel as Integer)
If Me.Combo50 = "Janaury" Then Me.Text23 = #01/01/2009#
If Me.Combo50 = "Janaury" Then Me.Text43 = #01/22/2009#
If Me.Combo50 = "February" Then Me.Text23 = #02/10/2009#
If Me.Combo50 = "February" Then Me.Text43 = #02/22/2009#
(and so forth through December)
End Sub
Text23 and Text43 are the invisible text boxes in form2 these correspond to
the choice you make in Frm1.
I tried adding 2010 dates but the report will not pick up 2010 dates ony
2009.
The report code is the following:
Private Sub Detail Form(Cancel As Integer, FormatCount As Integer)
If Me.Group_name>0 Then Me.Detail.BackColor = 14408667 Else
Me.Detail.BackColor = 16777215
If Me.[Type] = "something" Then Me.Label24.Visible = False
End Sub
Private Sub PageheaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If Me.[Type] = "something" Then Me.Label24.Visible = False Else
Me.Label24.Visible = True
End Sub
This is all the code in the report. My understanding of this is it is only
the formatting for the report headers. However, the report's source is a
query. The query's sql:
SELECT TableOne.State, TableOne.[Location],
TableOne.[DocName],TableOne.[DOCID],TableOne.ID,TableOne.[Group],TableOne.[MeetingDate],TableOne.[Type],IIF([Location]="New
York","NY" (etc Locations) too many to list
FROM TableOne
WHERE (((TableOne.State)=Forms!Frm1.State) AND ((TableOne.[MeetingDate])
Between forms!Frm2.Text23 AND forms!Frm2.Text43))
Can someone please help me how to have the report show 2010 dates. I don't
want to change much on this db as there is a possibiity that it may not be
used after 1st quarter of 2010. However, for now users need to see 2009 or
2010 or both. Thank you very much for any help I can get. As this is need
soon.
Not sure I did a good job of explaining myself the first time. But I really
need help with this. The one change I have to make is to add 2010 dates and
let user choose 2009 or 2010 or both. This db only has 2009 dates. I tried
to add 2010 dates and although it lets me enter 2010 dates it does not show
2010 dates when I run the report.
The first form (frm1) opens it has two command buttons. You choose one or
the other than another form (frm 2) opens. When this forms opens,it opens
with a single combo box where you can pick any month from January through
December. Once you choose the month, command buttons appear. One to view
report. When you click on the view report command you can view all of the
dates for the month you choose.
Frm 2 has the following code that call the combo box and (invisible) text
boxes in this form. This code houses the dates as follows:
Private Sub Comp50 BeforeUpdate(Cancel as Integer)
If Me.Combo50 = "Janaury" Then Me.Text23 = #01/01/2009#
If Me.Combo50 = "Janaury" Then Me.Text43 = #01/22/2009#
If Me.Combo50 = "February" Then Me.Text23 = #02/10/2009#
If Me.Combo50 = "February" Then Me.Text43 = #02/22/2009#
(and so forth through December)
End Sub
Text23 and Text43 are the invisible text boxes in form2 these correspond to
the choice you make in Frm1.
I tried adding 2010 dates but the report will not pick up 2010 dates ony
2009.
The report code is the following:
Private Sub Detail Form(Cancel As Integer, FormatCount As Integer)
If Me.Group_name>0 Then Me.Detail.BackColor = 14408667 Else
Me.Detail.BackColor = 16777215
If Me.[Type] = "something" Then Me.Label24.Visible = False
End Sub
Private Sub PageheaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If Me.[Type] = "something" Then Me.Label24.Visible = False Else
Me.Label24.Visible = True
End Sub
This is all the code in the report. My understanding of this is it is only
the formatting for the report headers. However, the report's source is a
query. The query's sql:
SELECT TableOne.State, TableOne.[Location],
TableOne.[DocName],TableOne.[DOCID],TableOne.ID,TableOne.[Group],TableOne.[MeetingDate],TableOne.[Type],IIF([Location]="New
York","NY" (etc Locations) too many to list
FROM TableOne
WHERE (((TableOne.State)=Forms!Frm1.State) AND ((TableOne.[MeetingDate])
Between forms!Frm2.Text23 AND forms!Frm2.Text43))
Can someone please help me how to have the report show 2010 dates. I don't
want to change much on this db as there is a possibiity that it may not be
used after 1st quarter of 2010. However, for now users need to see 2009 or
2010 or both. Thank you very much for any help I can get. As this is need
soon.