Again 2448 error problem!

species

New member
Local time
Today, 15:16
Joined
Nov 3, 2010
Messages
5
Date problem!

The simplest way to explain my problem is that I have a table with a date named LaatsteActie.
In a query I create two more dates. VolgendeActie (this is 1 year later then LaatsteActie) en Herinnering (one month minus VolgendeActie). Till here everything works like a charm.
I put all this in a form, all OK. Now the problem is that if VolgendeActie is the same as Date() (Today), then LaatsteActie should change to VolgendeActie and the recalculation starts again. So, the date will loop until it reaches today's date, then VolgendeActie = LaatsteActie.

I hope this sounds clear.

I tried several ways and can't get around, this is a major problem to me.

Can some guru's help me out here....
 
Last edited:
Last edited:
I'm still getting nowhere. Attached is a sample of my database. Maybe this explains my problem. In the form the dates will not update, causing error problems. As I have noted when the date() reaches VolgendeActie, this date must be transferred to LaatsteActie and calculate fields Herinnering and VolgendeActie. This loop must continue.

I'm out of brain.:(
 

Attachments

You can not use the code in the Open event for a continuous form. You have to do the checking for date in the query that is the record source for the form. You will need something like this
Code:
test_date: IIf([volgendeactie]=Date(),[volgendeactie],[laatsteactie])
test_date is the alias for the field. You will need to substitute test_date for the field laatsteactie in your form.
 
Just tried the query and it returns an error about using brackets for the arguments.
 
I have result using IIf([VolgendeActie]=Date();[VolgendeActie];[LaatsteActie])
It returns the correct dates. Now I have to implement it in the form. This brings me to the same problem.

If I donot recalculate the dates, they will be lost when the day is passed.
 

Users who are viewing this thread

Back
Top Bottom