Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible to have 2 of the same subform on the same form? 1

Status
Not open for further replies.

dmuroff

MIS
Aug 15, 2004
143
CA
Hi,

I have a database that keeps track of schedules.
A user will select a week and will have his/her schedule for the week.
I am thinking of having a tab control and having 1 tab for every day of the week.
I have created a subform which has time,location,city, person, etc. I have used a subform because on any given day there may be multiple entries of events.

If I were to do it this way I would have to have the same subform on each tab control and then try and add 1 to the date on everytab.

Does anyone have any suggestions on if this would work? or suggestions on how I can do it differently?

My tables are as follows:

User
PK UserID
Username

Report
PK Date
PK Time
PK User ID
Location
City
blah
blah


Thank you for your help.
 
I am assuming that there would be a tab for the whole week and then a tab for each day of the week.
This would require the same subform on each tab but an incremented recordsource for each tab which could be linked to the Page number 0 to 7


Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
So I would have to insert the subform into everyone of the tabs?

I have tried this and it did not work.

What do you mean by incremented recordsource?

Thanks!
 
There is no reason why it should not work - the common field for all of the subforms would be UserID.

Incremneted Recordsource means that the query populating the first subform (say Monday) would be .....Where date = #the selected date#
If the page number for Tuesday was 1 then the query could be .....Where date = (#the selected date#) + Pagenumber


Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
No!
From the form you are opening the schedule from have a textbox that will hold the start date of the week to be seen.
The query for the week could be:
Like Forms!frmStarter!StartDate + 6 ' start plus 6 days

For the remaining subforms:
Like Forms!frmStarter!StartDate + Me.PageNumber

set the startdate page as zero say this is Sunday
Monday would be 1 therefore the query is startdate plus 1
etc.. for tuesday onwards

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top