Update Form to display on Tab

  • Thread starter fapa via AccessMonster.com
  • Start date
F

fapa via AccessMonster.com

Hi

Im not sure if this can be done, but i have a form which i use to create a
lecture schedule. On the same form, i've create a tab box which has the days
of the week as the title of each tab. As i add a lecture to the form, id'
like it appear in the appropriate tab. eg.

Lecture - Antibotics and Herbal Medicine
Date - 15/03/2006
Time - 14:40
Hall - 1

Therefore on Wednesday's tab, it should display

WEDNESDAY

Hall 1
Anitbotics and Herbal Medicine

The reason im doing this is becasue i'd like to keep track of the lectures
booked in each hall as only 5 lectures can be booked in one particular hall
each day. The tab system lets me know whats been booked on each date without
having to exit the form and look at a report etc.

Can this be done??
 
S

strive4peace

of course...

on the main form, make an unbound textbox for the beginning
date of the week.

Name --> Mon

If, for instance, you choose Mondays to enter, on the
BeforeUpdate event of the control, make sure the day
selected is a Monday

The Weekday function returns the DOW (without optional
second parameter) for Sunday = 1

on the BeforeUpdate event of your control

'-------------------
if weekday(me.controlname) <> 2 then
msgbox "Choose a Monday to see the week",,"Invalid Date"
cancel = true
end if
'-------------------

then, make 4 calculated controls:
name --> Tue
ControlSource --> =Mon + 1
name --> Wed
ControlSource --> =Mon + 2
name --> Thu
ControlSource --> =Mon + 1
name --> Fri
ControlSource --> =Mon + 1

in the LinkMasterFields for each of the tabs, use Mon, Tue,
Wed, Thu, and Fri

in the LinkChildFields, use the controlname of the date
(which can have the VISIBLE property set to false)

if the event date stores a date and time, use

DateValue([fieldname])

to get the actual date

if you want the subforms be limited to the Hall that the
event is in, collect that information on the mainform and
add it to LinkMasterFields and LinkChildFields (delimit
controlnames with semi-colon ; )


Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
F

fapa via AccessMonster.com

Thank you for ur suggestion! i've tried it out however on the main form, the
date box is a combo box that is linked to the Date table (which displays the
dates for One week). All the dates in the combo box are in a numeric format
(e.g 12/03/2006) so i dont know how to link the date to the weekday it is and
then link that to the tab. does that make sense? (im really new to access so
im sorry in advance if the solution is obvious!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top