THANKS SO MUCH! Previously the user was prompted to enter the pay period
for
every form/report. I wanted to eliminate that, so I created a table called
Date and they would enter the date the pay period ends. I didn't realized
that was a bad name, so I renamed the table PAYPERIODDATE and the field to
PayPeriodDate. Then for my reports I use the date to run all the reports.
Every two weeks the date will of course change.
Here's a more detailed example:
fSubsidy Form
Pay Period Ending: [9/5/08] (this changes every 2 weeks)
MFID: [32433] (This is an auto number field that "connect" the main form
to
subform
_________________________
sfSubsidy
Date Job Code Prog Units Pay Subsidy :
9/8/08 [32433] 123 691 4 .25 [cursor hits here]
9/8/08 [32433] 165 781 3 1.25 [ ]
9/5/08 [32433] 99 66 [ .50] would like to be
here
*Using whatever is in Pay Period Ending--will change every 2 weeks
__________________________
They have a different form for entering all the daily work. They are
subsidized to bring their gross pay to $2.00 at the end of the pay period.
I'm using this form just to enter subsidies. I need to create a record in
a
table.
I "locked" all the fields except for the subsidy field. On enter I clicked
[Event Procedure] and entered the following.
If Me.NewRecord Then Me.[Date] = Parent.[Pay Period Ending]
Your suggestion worked PERFECT!
Just one more question. Do you know how I would automatically drop down to
the last record in the subform? The records in the forms all vary
according
to how many jobs they've done. When they open this form, I would love for
them to be sitting in a blank record so they could just enter the subsidy
and
close the form (all other fields are locked.
THANKS!!!!!!!!!!!!
Steve said:
You do not need the date field in the subform at all! Your tables should
look like:
TblPay
PayID
PayPeriodEnding
etc
TblSubsidy
SubsidyID
PayID
Subsidy
If in another form or in a report you need the data in TblSubsidy to
include
the date, use a query that joins both tables and use the date in
PayPeriodEnding.
Your tables need revised!
Steve
Rita said:
I have a form (fSubsidy) with a field called "Pay Period Ending".
Included
in
this form is a subform (sfSubsidy). The user is only using this form to
enter
a subsidy.
I would like to automatically fill the field "Date" in sfSubsidy with
whatever date is in "Pay Period Ending".
Example:
fSubsidy Form
Pay Period Ending: [9/5/08]
_________________________
sfSubsidy
Date: [9/5/08] Subsidy: [$1.05]
__________________________
THANKS!