Tab Control - Add New Tabs - Query Based, Office 2003
Feb 25 2010, 12:23 PM
Ok... I was wondering if this was at all possible..
I Have a form that has a Tab COntrol on it. I had the idea of listing the days of a month that have reports due based on query.
For example, out of a month days 2, 5,8 only have reports due. So when you open the form it runs the query to see what days have a form due. Once it gets it go through and add tabs for each day. This is what I got :
Dim MyDB As DAO.Database
Dim qdef As DAO.QueryDef
x = 1
Set Db = CurrentDb
Set rs = Db.OpenRecordset("SELECT D_List.Report_Due FROM D_List GROUP BY D_List.Report_Due")
If rs.EOF = False Then
Do While Not .EOF
TabCtl1.Pages(x).Caption = rs!report_due
x = x + 1
Well of course ran into the rpoblem that when i open the form it tells me that you can only add pages to a tab control while in design view. is there anyway around this?
|Go to Top · Lo-Fi Version||Time is now: 22nd May 2013 - 11:49 PM|