Date Lookup

kcolbert01

Registered User.
Local time
Yesterday, 21:50
Joined
Jan 13, 2003
Messages
36
Hello - I am creating a form that will generate Sign On Bonuses. If there is a bonus of $1000 it is paid out in 3 increments of 3/6/12 months. I have already figured how to automatically calculate the dates for these payouts. My problem is that I need to show the actual payroll PAYDATE that the bonus dates fall in between.

I have created a table listing the payperiods, however I can't figure out how to link it to my qry and what code to write to link these together. I tried the following code:

If Me!ThreeMosPymnt >= [TblPayDates].Column(2) And Me!ThreeMosPymnt <= [TblPayDates].Column(3) Then
Me!ThreemosPayEndingDate = [TblPayDates].Column(4)

But I get an error msg that says it doesn't recognise the table [TblPayDates].

I've done this in the past for calculations - is it possible to do this with dates? Or is there another way?

Thanks:)
 
I think so....

I believe the problem is the Me. Me points to the form currently active or the form with the "focus". All you need to do is include some code before the requery code that activates the subform. then use the "me" after that is the active form. Otherwise the requery is working, but it is being based of the Main Form.
 

Users who are viewing this thread

Back
Top Bottom