A
Air-ron
I was going to try and muddle through this on my own, but I'm under a time
crunch now, so I'd appreciate any help I can get.
I have a DB that I'm setting up to track customer count data in a casino.
The casino is broken down into Floors and each floor inot zones, Each zone
has machines by different vendors. The counts are done in 2 hour intervals
(on even numbered hours) by people on 3 different shifts. Thus, I have
tables for Floors, Zones, Shifts, Times, and vendors. Shifts is related to
times 1toM; Floors is related to zones 1toM, and vendors is related to zones
MtoM, using a junction table VendorZones. The table Counts has fields for
Date, CountTime, Vendor, and Zone (combination primary key) and HeadCount,
(the important data). Zone, Vendor, and CountTime are all related to their
respective tables as well.
I'm pretty sure I've got it set up properly (with lots of help from the
design forum)
Now I need to set up a data entry form.
I have a form set up right now where a shift manager can select the date
(using date picker), the Floor (a combo box), and the Shift (a combo box)
I'm hoping to put in a button that takes those 3 values, and checks the
counts table to see if records exist for those combinations.
In other words :
Given SHIFT, FLOOR, and DATE;
For all times within SHIFT:
For all zones within FLOOR:
For all Vendors within Zone:
If DCount("*", "tblCounts", "[GDay]=#" & _
GetDate() & "# And [CTime]=#" & ctime _
& "# And [ZoneID]=" & zone & " And [VendorID]" _
= " & vend") < 1
Then
Add a new record to tblCounts using DATE, Floor,
Time, Vendor,
and set HeadCount to 0.
EndIF
EndLoop
EndLoop
EndLoop
I have a query set up that shows (except for the date) what records would
need to be checked - including the junction table tie-ins.
I think I've got the program outlined properly, but that's a lot of code for
me to figure out in the next couple of days - Does this at least make sense
to you guys?
aaron
crunch now, so I'd appreciate any help I can get.
I have a DB that I'm setting up to track customer count data in a casino.
The casino is broken down into Floors and each floor inot zones, Each zone
has machines by different vendors. The counts are done in 2 hour intervals
(on even numbered hours) by people on 3 different shifts. Thus, I have
tables for Floors, Zones, Shifts, Times, and vendors. Shifts is related to
times 1toM; Floors is related to zones 1toM, and vendors is related to zones
MtoM, using a junction table VendorZones. The table Counts has fields for
Date, CountTime, Vendor, and Zone (combination primary key) and HeadCount,
(the important data). Zone, Vendor, and CountTime are all related to their
respective tables as well.
I'm pretty sure I've got it set up properly (with lots of help from the
design forum)
Now I need to set up a data entry form.
I have a form set up right now where a shift manager can select the date
(using date picker), the Floor (a combo box), and the Shift (a combo box)
I'm hoping to put in a button that takes those 3 values, and checks the
counts table to see if records exist for those combinations.
In other words :
Given SHIFT, FLOOR, and DATE;
For all times within SHIFT:
For all zones within FLOOR:
For all Vendors within Zone:
If DCount("*", "tblCounts", "[GDay]=#" & _
GetDate() & "# And [CTime]=#" & ctime _
& "# And [ZoneID]=" & zone & " And [VendorID]" _
= " & vend") < 1
Then
Add a new record to tblCounts using DATE, Floor,
Time, Vendor,
and set HeadCount to 0.
EndIF
EndLoop
EndLoop
EndLoop
I have a query set up that shows (except for the date) what records would
need to be checked - including the junction table tie-ins.
I think I've got the program outlined properly, but that's a lot of code for
me to figure out in the next couple of days - Does this at least make sense
to you guys?
aaron