how to add sequential dates with ref nr with append query

vdb@telenet.be

New member
Local time
Today, 21:58
Joined
Apr 7, 2015
Messages
1
I want to populate a table with field:date and field ref nr.(7 fixed ProductID's)
But only weekday and to 3 years from now. (every weekday)


Example

field:ID | date | fixed.ref.nr
--------------------------------
1 | 7/4/2015 | 1001
2 | 8/4/2015 | 1002
3 | 9/4/2015 | 1003
4 | 10/4/2015 | 1004
5 | 13/4/2015 | 1005
6 | 14/4/2015 | 1006
7 | 15/4/2015 | 1007
8 | 16/4/2015 | 1001
9 | 17/4/2015 | 1002
10 | 18/4/2015 | 1003
.... (ID field is autonumber field and not important..)

If anyone can help me out how to do this with a append query or code?

Thank you in advance!

Bart from Belgium
 
I personally would do it in code, using a loop until the date was up to x. I'd use the AddNew method of a recordset to add dates to the table, along with the Weekday() function to decide whether to add days. I don't really understand what you want with fixed.ref.nr.
 

Users who are viewing this thread

Back
Top Bottom