From: Jaybird5013 on
Thanks, Peter. You really are amazing, answering my humble post in this way.

"Regarding your data - you have not supplied much so here are a few
questions that need to be addressed. I am guessing that you want to show one
weeks worth of data (presumably 7 days) although you only show Monday to
Wednesday in your post. So does that mean you want 7 columns (plus one for
the row label)?"

You are correct.

"How many rows do you need, is this one row for each Caregiver plus the
headings?"

No, it's one row for each CLIENT, not caregiver. Not more than 50 rows.
Probably not more than 30.

"What information will go into each cell, is it the client name plus the
appointment
times?"

I need the form to reflect the Client and the associated Caregivers and
Appointment Times. Sometimes clients have appointments in the morning and
afternoon.

"Can there be more than one client for an appointment?"

No, only one client per appointment, but there could be more than one
caregiver.

"Can appointments overlap?"

No, but several appointments could happen simultaneously.


--
Jaybird
From: Peter Hibbs on
Jaybird,

OK, so you have a column for each day of the week plus the left column
will show a client name on each row and in the cells you would have
the Caregiver name (perhaps initials would be better to save room,
maybe) plus the appointment times in that day. So your grid would look
something like this :-

Appointments for Week 18 Apr - 24 Apr 2010
Sun Mon Tue Wed Thu Fri Sat
Client A ABS CDR DES HTR
0800 1100 0900 1000
Client B CDR DES HTR
0800 1200 1400
Client C ABS DES DES
1100 0900 1500

The first row shows the current week. The second row shows the days of
the week. The third and subsequent rows show the client name and under
the day of the week, the Caregiver name (i.e. ABS, CDR, DES, etc)
along with the appointment time (I have just shown the start time but
you could also show the end time, if required). So on Sunday 18th
Client A has an appointment with ABS at 08:00, Client B has an
appointment with CDR at 08:00 and Client C has an appointment with ABS
at 11:00. On Friday, Client A has an appointment with HTR at 10:00 and
Client B has an appointment also with HTR at 14:00 and so on. Is this
an accurate assessment of what you are wanting?

If this is correct I don't see any real problems with implementing
this in a Flex Grid but the actual code required will, of course,
depend on your table names, field names, etc. The way I would do this,
I think, is to create a grid with all the Client names shown in the
left rows which means that there will be one row for each client plus
two more rows for the two header rows. This will probably mean that
you will need vertical scroll bar if there are 50 or so clients. I
presume you already have some means of adding clients to your Client
table via a form. Is it acceptable to show all client names in the
grid even if they don't have any appointments for the selected week or
do you ONLY want to see clients that do have appointments, (which may
not work because you will presumably want some mechanism to add
appointments to the grid which means that you would need every
possible client name to be visible in the grid).

Anyway, before you can build the Flex Grid form you need to sort out
your tables, perhaps you could post back your table structure so that
we can see the table names, field names and field types.

Peter Hibbs.

PS It is getting late in the UK, I will check out this thread again
tomorrow.



On Tue, 20 Apr 2010 13:28:02 -0700, Jaybird5013
<Jaybird5013(a)discussions.microsoft.com> wrote:

>Thanks, Peter. You really are amazing, answering my humble post in this way.
>
>"Regarding your data - you have not supplied much so here are a few
>questions that need to be addressed. I am guessing that you want to show one
>weeks worth of data (presumably 7 days) although you only show Monday to
>Wednesday in your post. So does that mean you want 7 columns (plus one for
>the row label)?"
>
>You are correct.
>
>"How many rows do you need, is this one row for each Caregiver plus the
>headings?"
>
>No, it's one row for each CLIENT, not caregiver. Not more than 50 rows.
>Probably not more than 30.
>
>"What information will go into each cell, is it the client name plus the
>appointment
>times?"
>
>I need the form to reflect the Client and the associated Caregivers and
>Appointment Times. Sometimes clients have appointments in the morning and
>afternoon.
>
>"Can there be more than one client for an appointment?"
>
>No, only one client per appointment, but there could be more than one
>caregiver.
>
>"Can appointments overlap?"
>
>No, but several appointments could happen simultaneously.
From: Jaybird5013 on
I guess my best description of the form I want is:

A column list of clients followed by columns representing the days of the
week. Each of which corresponds to the calendar date for that day.

Under those days of the week headings I need the caregiver corresponding to
that day of the week and that client, and the hours for that shift.

Right now I have three tables: tblClients, tbleCaregivers, tblAppointments.

The point of this is to be able to see at a glance that all shifts for all
clients have been covered and by who and when. I can use a scroll bar if I
have too many clients to see at once.

--
Jaybird


"Jaybird5013" wrote:

> Thanks, Peter. You really are amazing, answering my humble post in this way.
>
> "Regarding your data - you have not supplied much so here are a few
> questions that need to be addressed. I am guessing that you want to show one
> weeks worth of data (presumably 7 days) although you only show Monday to
> Wednesday in your post. So does that mean you want 7 columns (plus one for
> the row label)?"
>
> You are correct.
>
> "How many rows do you need, is this one row for each Caregiver plus the
> headings?"
>
> No, it's one row for each CLIENT, not caregiver. Not more than 50 rows.
> Probably not more than 30.
>
> "What information will go into each cell, is it the client name plus the
> appointment
> times?"
>
> I need the form to reflect the Client and the associated Caregivers and
> Appointment Times. Sometimes clients have appointments in the morning and
> afternoon.
>
> "Can there be more than one client for an appointment?"
>
> No, only one client per appointment, but there could be more than one
> caregiver.
>
> "Can appointments overlap?"
>
> No, but several appointments could happen simultaneously.
>
>
> --
> Jaybird
From: Peter Hibbs on
Jaybird,

You did not answer the questions I asked so it is a bit difficult to
give more precise information. It sounds now as if you have one
Caregiver for each day of the week which would be shown at the top of
each weekday column but I am still not sure what should appear in the
cells at the junctions of the clients and caregiver, you seem to be
talking about 'hours in a shift' rather than appointment times.

The problem here is that it is taking me longer to explain how you
should write the code than it is for me to write it myself. Perhaps it
would be quicker and easier if you can send me a copy of your database
and I will get the Flex Grid form working for you. Then you can carry
on with the rest of the database design yourself. If this is
acceptable to you perhaps you could send me the file (zipped, of
course) to the email address in the documentation on the Web site.

Also can you provide the following information as well :-

A valid returm email address (obviously).
What version of Access are you using.
What is your screen size (in pixels).
What do you expect the final grid to look like. It would be useful if
you could make up an example in Excel and include that (or a screen
shot of it).
What is this database supposed to do, a fairly detailed explanation
would be useful and how you see it working in practice.

I am not guaranteeing that I can do this and I am not proposing to
write the whole database but I will try and help with the Flex Grid
code, if I can.

Peter Hibbs.



On Tue, 20 Apr 2010 14:39:01 -0700, Jaybird5013
<Jaybird5013(a)discussions.microsoft.com> wrote:

>I guess my best description of the form I want is:
>
>A column list of clients followed by columns representing the days of the
>week. Each of which corresponds to the calendar date for that day.
>
>Under those days of the week headings I need the caregiver corresponding to
>that day of the week and that client, and the hours for that shift.
>
>Right now I have three tables: tblClients, tbleCaregivers, tblAppointments.
>
>The point of this is to be able to see at a glance that all shifts for all
>clients have been covered and by who and when. I can use a scroll bar if I
>have too many clients to see at once.
From: Jaybird5013 on
My table structure as it exists now is primarily for testing purposes, but I
thought it would go something like this:

tblClients:
PK ClientID
txtClientName

tblCaregivers:
PK CaregiverID
txtCaregiverName

tblAppointments:
PK AppointmentID
txtStartTime
txtEndTime
CaregiverID
ClientID

I can add more information to the tables later if I can get this structure
to work. I've worked with simple vba in the past and while it takes me
forever I can usually figure it out by looking at other examples. My idea
was to call a form by clicking on a cell, updating the appointment table that
way, then using the OnClose event to trigger an update of the form.
Similarly, I can change the date range of the form by using the same method
you used in your example of the Time Sheet. That is, a text box where the
current week can be input. Presumably, all the cells of the form are updated
with the correct date from this textbox.

I have toyed with the idea of using a dumb form and populating all the cells
with code... but that seems like a lot of code and I don't want to reinvent
the wheel if there is a tool out there that will make my job easier.

I've taken a blank form and added the Flex Grid control, but I don't know
what to do with it. I've found the Flex Grid Properties. I presume that I
can dictate how many rows and columns I have with it. I don't know how to
control it from the form, however. I can't find any documentation for how to
use the Flex Grid aside from yours so guidance would be appreciated.



--
Jaybird