473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Representing time slots on a sub form

121 100+
Hi,

I have an equipment booking database the idea is that you book a list of equipment to a scheduled session I have a main form that displays the details for a session, date time location etc..

In that form I have a sub form that displays booked equipment related to that session. When a user attempts to book a piece of equipment a check is run on that piece of equipment to see if it is already booked elsewhere.

To represent this graphically I have created green rectangles on the sub form each representing an hours time slot so rectangle 1 = 09:00 - 10:00 rectangle 2= 10:00 - 11:00 etc when the check is run and if the equipment is booked it changes the rectangles from green to red,

I currently have this working by setting my sub form to continuous forms which lists the equipment that is related to the scheduled session but because the rectangles are not related to the individual equipment record in the detail section of the form when the change in colour on the rectangle box is applied it changes the colour for all equipment records.

So for example a user attempts to book equipment1 which is already booked from 09:00-12:00 and the next equipment record equipment 2 is booked from 17:00 - 19:00 I want to be able to show that both these pieces of equipment are booked at different times.

I think I will be able to do it if a set the sub form to single form view and create say 20 rows of fields and rectangles but that will restrict me to 20 records on the form where as if I set the sub form to continuous forms I can have any number of records....

Hope this makes some sense

Please help

Regards Phill
May 18 '08 #1
4 2238
puppydogbuddy
1,923 Expert 1GB
Hi,

I have an equipment booking database the idea is that you book a list of equipment to a scheduled session I have a main form that displays the details for a session, date time location etc..

In that form I have a sub form that displays booked equipment related to that session. When a user attempts to book a piece of equipment a check is run on that piece of equipment to see if it is already booked elsewhere.

To represent this graphically I have created green rectangles on the sub form each representing an hours time slot so rectangle 1 = 09:00 - 10:00 rectangle 2= 10:00 - 11:00 etc when the check is run and if the equipment is booked it changes the rectangles from green to red,

I currently have this working by setting my sub form to continuous forms which lists the equipment that is related to the scheduled session but because the rectangles are not related to the individual equipment record in the detail section of the form when the change in colour on the rectangle box is applied it changes the colour for all equipment records.

So for example a user attempts to book equipment1 which is already booked from 09:00-12:00 and the next equipment record equipment 2 is booked from 17:00 - 19:00 I want to be able to show that both these pieces of equipment are booked at different times.

I think I will be able to do it if a set the sub form to single form view and create say 20 rows of fields and rectangles but that will restrict me to 20 records on the form where as if I set the sub form to continuous forms I can have any number of records....

Hope this makes some sense

Please help

Regards Phill
For performance reasons Microsoft designed controls on a continuous form as single controls with multiple instances. There are several ways that you can address different instances of a single control. One of them is built into Access. It is known as conditional formatting.

Have you tried conditional formatting? That is one way that you can solve your problem. Conditional formatting enables to set formatting properties (including color) for just those instances that meet certain conditions.

To use conditional formatting, place your subform in design view, highlight the control that you want conditional formatting to be applied to, then go to the command menu at the top of your screen. Select Format> conditional formatting.

If you need assistance with setting up the conditional formatting, let us know.
May 18 '08 #2
phill86
121 100+
For performance reasons Microsoft designed controls on a continuous form as single controls with multiple instances. There are several ways that you can address different instances of a single control. One of them is built into Access. It is known as conditional formatting.

Have you tried conditional formatting? That is one way that you can solve your problem. Conditional formatting enables to set formatting properties (including color) for just those instances that meet certain conditions.

To use conditional formatting, place your subform in design view, highlight the control that you want conditional formatting to be applied to, then go to the command menu at the top of your screen. Select Format> conditional formatting.

If you need assistance with setting up the conditional formatting, let us know.
hi puppydogbuddy

Thanks for the help but I think you misunderstand my problem I am able to change the colour of the rectangles no problem.

The main form shows the session details location, date, time etc

The sub form shows several pieces of equipment that have been booked to the session in the continuous forms format I want the rectangles that represent the hourly time slots from 09:00 - 24:00 to show whether the selected piece of equipment is already booked somewhere else by changing the colour to red.

So imagine three records showing three different pieces of equipment the user selects what piece of equipment they want to book from a list in the first column the start time in the second column then the end time in the third column. There is a row of green rectangles representing time slots from 09:00-10:00 10:00 -11:00 up until midnight I am able to change the colour of the rectangles no problem but if the colour changes, for example, on the first two boxes 09:00 - 10:00 and 10:00 -11:00 in the row for Equip1 it changes them in all of the columns for Equip2 and Equip3 I want to be able to associate the time slot rectangles to the individual equipment record I have tried to illustrate it below. Is there any way I can send you a picture because I am sure it will make a lot more sense?


Equip1 12:00 15:00_____________09:00-10:00 10:00 -11:00...23:00-24:00
Equip2 14:00 15:00_____________09:00-10:00 10:00 -11:00...23:00-24:00
Equip3 15:00 17:00_____________09:00-10:00 10:00 -11:00...23:00-24:00

Regards Phill
May 19 '08 #3
puppydogbuddy
1,923 Expert 1GB
Phill,
I understand your problem andI still believe conditional formatting is the answer because it will only execute the actions (e.g. change the color of those textboxes) that meet the condition you set. Microsoft provided the conditional formatting to address the continuous form problem. try it....if you need help setting the conditions let me know.

PDB
May 19 '08 #4
FishVal
2,653 Expert 2GB
Phil.

If you have Access 2007, then you may advantageously use its new feature - Image control having ControlSource property.

Regards,
Fish
May 19 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Boris Boutillier | last post by:
Hi all, Of what I heard Python 2.3 now allow creation of new types in C with slots. Is there somewhere some documentation on this, or at least an example ? Thanks a lot Boris
2
by: Stuart | last post by:
Hi all, I have a problem that I just cannot figure out for the life of me. I am trying to set up a database that contains time slots (6 X 4hr periods to cover the day) starting from 00:00:00...
1
by: Frank Bossy | last post by:
Dear group :) I don't quite understand the meaning of this paragraph in the qt docu (http://doc.trolltech.com/3.1/threads.html): ***SNIP The Signals and Slots mechanism can be used in...
6
by: D | last post by:
Hello all...I have an issue with one of my java script functions that I'm hoping someone can easily help with. I have a web based application that we use to create/sign up for overtime. When we...
12
by: David Isaac | last post by:
Is it expected for access to set elements to be much slower than access to list elements? Explanation? Thanks, Alan Isaac 9.806250235714316 3.9823075279120701
0
by: Brian Vanderburg II | last post by:
I don't know if any such support is already built in, so I ended up making my own simple signals/slots like mechanism. If anyone is interested then here it is, along with a simple test. It can...
1
by: Scott SA | last post by:
On 5/1/08, Brian Vanderburg II (BrianVanderburg2@aim.com) wrote: Did you review this? <http://pydispatcher.sourceforge.net/> from what I understand is originally based upon this:...
0
by: Steve | last post by:
The approach in this thread looks wrong to me considering your example. Your example shows you have random time periods between 6AM and 6 PM for appointments. Appointment 1 is 1-1/2 hour,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.