Pictorial Scheduling on a Form

B

Brendan

Hi,
I have a query which captures:

When a customer is due, Which of 4 tables they
reserve, How long they'll stay.

I want to create a Form, which has boxes appropriately aligned with a
(vertical time) grid, depicting when/which and how long. (similar to an
Outlook calendar page, only with 4 columns, not 1.)

I have everything figured out except how to make a variable of the control
box Name, which I move, resize and fill with text data.

I expect to have about 40 clients a day, so my present method requires
making 40 control boxes on the Form, (named box1, box2,...box40). That's
ok.

Then I run through the Query's data, and use the Select Case to find the
right box, move it, resize it and fill it with the correct data from the
Query.
===========================================================
i = i + 1
Select Case i
Case 1
box1.SetFocus
box1.Text = Str(s0) & " -" & s6 & Str(s7) & " -" & s9 & " =" &
s10
box1.Left = 1000
box1.Top = (t3 - 7) * hrgap
box1.Width = W
box1.Height = H
Case 2
box2.SetFocus
.......
Case 3
box3.SetFocus
.......
==============================================================
....... and so on, up to 40.

QUESTION: is there any way to make the "box1" a variable "boxN" so
I can cycle through them 1..40 much more easily? with a LOOP rather than a
CASE? Just can't make it happen.

I think I got the hard stuff, can't get the easy one.

Thanks for any suggestions.
BJC
 

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