1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Assume your field names are dYear for the Year column, dMonth for the month column then in a query to create the dates you wish
PHP Code:
SELECT tbldates.dYear, tbldates.dMonth, DateSerial([dYear],Switch([dMonth]="Jan",1,[dMonth]="Feb",2,[dMonth]="Mar",3,[dMonth]="Apr",4,[dMonth]="May",5,[dMonth]="Jun",6,[dMonth]="Jul",7,[dMonth]="Aug",8,[dMonth]="Sep",9,[dMonth]="Oct",10,[dMonth]="Nov",11,[dMonth]="Dec",12),1) AS sMonth FROM tbldates;
This will put the dates in a new field called sMonth. You can then hide your field dMonth by unchecking the display check box in your QBE.
Assume your field names are dYear for the Year column, dMonth for the month column then in a query to create the dates you wish
PHP Code:
SELECT tbldates.dYear, tbldates.dMonth, DateSerial([dYear],Switch([dMonth]="Jan",1,[dMonth]="Feb",2,[dMonth]="Mar",3,[dMonth]="Apr",4,[dMonth]="May",5,[dMonth]="Jun",6,[dMonth]="Jul",7,[dMonth]="Aug",8,[dMonth]="Sep",9,[dMonth]="Oct",10,[dMonth]="Nov",11,[dMonth]="Dec",12),1) AS sMonth FROM tbldates;
This will put the dates in a new field called sMonth. You can then hide your field dMonth by unchecking the display check box in your QBE.
Bookmarks