Normal Topic method of making a relational link subform (Read 285 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
method of making a relational link subform
Apr 12th, 2004 at 6:11pm
Print Post Print Post  
Is there a method of making a relational link subform link based on more then one element condition?

I wanted to have the ability to see a set schedule from any record and have the ability to update that schedule from within a client record. I created a new database within my application that is basically used for viewing data from many records not just one so I used relational instead of natural.

In this database I  have about 10 elements.
Location, Date, Day of  week, Timeslot1, Timeslot2, Timeslot3 ,Timeslot4, Timeslot5 and Timeslot6

I planned on pre entering 1 record containing the location name and each day of the year for every location (I manually typed 1 month for test purposes. Anyone have an easy way to create a years worth?).

Then a manager for a specific location can access the scheduling database and  x out unavailable time slots on specific dates for a specific location.

So now I would have a database containing records for 6 preset timeslots at each location for every day of the year.

From my main form I created a tab with a relationally linked subform in tableview of the new scheduling database linked by an element called location trigger in the main db and location in the scheduling.

When I place the word Westlake in the location trigger element all the records that match location Westlake populate the rows in the subform. Now I can see the available timeslots in a table in date order and I can enter a client id in the available timeslot element to indicate it is no longer available (I will also add logic to return the date location and time to the event database for this specific client)

This works fine in this basic format however I need to control what displays in the table by location and a date range. For example I would want to match location Westlake and dates greater then yesterday and less then 60 days from today.

My first thought was to create an element in the scheduling db that combines the location element and the date element to use as my linking element. I then created elements in my main database that had the user select the location from a popup and then add todays date -1 to it and return that value to the trigger element.

I can not find the correct mechanism for matching a specific location plus a specific date range so only the desired location and next 60 days worth of records display.

Anybody have any thoughts on how this can be done?
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged