Taking form value and displaying on report

D

Drew

I have a report that when it is run, it pops up a form for some values, and
then takes those values and displays them on the report. The report is for
Comp Accruals and takes two values, Reason and Date. This report is run
after holidays and inclement weather days, and since there can be more than
one day on the report, I need to account for this. On my report I have 5
columns, Name, SSN, Date1, Date2, Date3.

If there is one day that needs to be displayed, that is no problem. But, if
there are two days, like 12/12/2005 and 12/13/2005, I need some way to do
this. I have added 2 checkboxes and 2 textboxes to my form, so if there are
2 days, the user checks the checkbox and fills in the date. How can I tell
the report to make the date visible and display the date entered if the
checkbox is checked?

Also, is there a way to "gray out" the second date box if there isn't a
check in the checkbox?

Thanks,
Drew
 
F

Fons Ponsioen

Hi Drew, First, everything is possible as you describe, I
would however recommend a more normalized approach to your
data table, Since this pertains to comptime, what if the
the sequential dates fall in different pay periods, that
you would want to separate these dates again, and what if
the sequential days are for different reasons would you mo
want to be able to account for these separately?
Recommend:
One table with personel data (EmplID, Fname, Lname, SSN
etc.)
Second table with comp day data (EmplID, Date,
CompCategory etc)

Your input form would consist of one form for the
personnel data and a subform for the comptime listing.
This would also allow for an unlimited number of entries
which you cna filter as applicable.

Now you can create a report based on a query joining these
two tables and print data related a pay period, or Comp
Category etc.

Hope this helps.
Fons
 
D

Drew

Actually the comp time isn't inserted into a database. It is just displayed
on the report. Say we have a blizzard, and administration gives us 2 hours
on 2 consecutive days so that we can get to work. The people who come in at
the regular time (instead of using the 2 hours) get 2 hours extra comp time.
This report is sent out to the timekeepers at this facility and they write
in how much time each person has. Say Bob comes in at the regular time and
Shirley comes in 1 hour late, and Tom comes in 2 hours late. Then Bob would
get 2 hours, Shirley 1 and Tom none. This is only for display and printing
on the report, and nothing else.

Thanks for your response, although my question isn't answered.

Thanks,
Drew
 
F

Fons Ponsioen

To gray our a textbox, I would use conditional formatting,
if the value for this variable is null, the backgound
color can be set to gray. The conditional formatting is
accessed by opening the report in design view, selecting
the applicable text box and selecting conditional format
from the Format menu.
Hope this helps.
Fons
-----Original Message-----
Actually the comp time isn't inserted into a database. It is just displayed
on the report. Say we have a blizzard, and
administration gives us 2 hours
 
D

Drew

I figured it out... just wrote a conditional, if the checkbox is checked
then enable the textbox....

Thanks,
Drew
 
Top