My Assistant
|
|
Feb 25 2010, 12:23 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 171 |
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 : CODE 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 With rs .MoveFirst Do While Not .EOF TabCtl1.Pages.Add TabCtl1.Pages(x).Caption = rs!report_due x = x + 1 .MoveNext Loop End With End If rs.Close 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? |
|
|
|
![]() |
Feb 25 2010, 12:41 PM
Post
#2
|
|
|
UtterAccess Addict Posts: 171 |
I orginally had the the form doing as you stated. However, I was trying to be creative since i was expanding upon this idea, because when you click on a date my idea was to have it show a sub form with its own tab control on it that list the different reports, which of course was suppose to be generated in the same way. It was a crazy inovated way but i guess access isnt advanced enough to do it :-( ... Thanks for your help.
|
|
|
|
fullyunknown Tab Control - Add New Tabs - Query Based Feb 25 2010, 12:23 PM
pere_de_chipstick Hi fullyunknown
No I don't believe you can ad... Feb 25 2010, 12:32 PM
pere_de_chipstick RE: Tab Control - Add New Tabs - Query Based Feb 25 2010, 12:46 PM
fullyunknown Follow-Up In Case Anyone Else for any odd reason w... Feb 26 2010, 07:36 AM
pere_de_chipstick Hi fullyunknown
Glad you found a solution that mee... Feb 26 2010, 08:35 AM![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 07:29 PM |