Do I need a table (1 Viewer)

Oldsoftboss

AWF VIP
Local time
Today, 17:44
Joined
Oct 28, 2001
Messages
2,499
A company I deal with has asked me to look into making a databse to print out tickets.
I invisage this would take the form of a label type print out with about 10 or 15 tickets to a page.

Problem.

Their current system starts with the following questions.
Make: Seating tickets, Raffle tickets, etc

When you select seating tickets it asks the no of rows, then what they are to be called (Row A,B,C etc)
Then how many seats in each row.

The tickets then print: Row A Seat 1, Row A Seat 2, etc up to the max no of seats in each row. Then starts Row B Seat 1 etc.

How would I generate these numbers automatically. I'm wondering if I even need a table or simply generate through code.

If a table is required that form would it take?

Thanks

Dave.
 

llkhoutx

Registered User.
Local time
Today, 02:44
Joined
Feb 26, 2001
Messages
4,018
I would use a three column tables to keep track of the "status" of each seat. Columns would be "sRow","intSeat","ynSold", where:

sRow=string row letter (size is determined by the number on rows, if <26, 1 character, if >26 and <=52, then 2 characters, etc.)
intSeat=integer seat number (a byte number may be sufficient).
ynSold=boolean indicatory of seat status

Set sRow and intSeat as the table key, that is, the combination of the two are unique.

I would then initialize the table with data via VBA code, using two nested loops. The number of rows and the number of seats per row may be irregular.

You could build a form consisting entirely of textboxes visually representing the seating arrangement, with the text boxes changing color when a seat is sold, etc. Double click a text box would change its color and change it's status in the table. Use the tag of each textbox tohold the row and seat number for updating the table. Building the form will be tedious but it will work well.

For multiple date tracking, just add a date column to the table and index key. Populate the form by date with VBA code as necessary.
 

Users who are viewing this thread

Top Bottom