Please help me :|

  • Thread starter Thread starter MattCrawford
  • Start date Start date
M

MattCrawford

I have a slightly difficult situation here. I'm fine at creating
systems for databases and designing tables etc. But I need to build a
way to do a complicated task.

I have a table of servers and racks. In the table of servers I define
what device type it is by a number relating to another table that
defines what that number means. That sub table defines the height of
the server in units, mostly 1-15 units. In the server table I also
state what the starting unit on the rack is.

Each of the racks has 42 availible units. I have a form that adds a
new server, and I need it to have a drop down box of availible units
based on the server size sub form. So the form has to grab data from
the server table, then reference the server type table for the height,
compare to the racks table and display only starting units that would
hold the full server size. For example:

Server1 is type 2 and starts on unit 42 (the bottom), of rack 400.
Type 2 (sub form) says the height is 3 units.

I go to add server2 and from my form I go to select the rack 400 from a
dropdown of racks availible. Then I want a 2nd drop down that quieries
for the starting point and height. So starting at 42, and subtract the
height is 39. So 39-42 are taken. So it would not show 39, 40, 41, or
42.

The problem is they are not all filled from the bottom up and are
randomly placed with mixed intervals in each rack. My first idea was
to add colums in the racks table for each unit number that would be
simple yes or no check boxes to see if that unit was taken. But then I
could'nt figure out how to display only availible based on the height.
I assume the quasi math is this:

Get availible units from racks table,
get new system height from server table, then sub form of device type,
now I need a way to list only sets of the availible height.
For example, if the height is 3, only list a starting point unit that
has at least 3 more open spots around it. But a table cant hold that
kind of numerical data, just off and ons with the check box..


BLLAARRRGGGHHHHHHH I neeeeeed heeeeeellllpppp. Please? Thanks in
advance.
 
Are you aware that you can use a select query that
collects its criteria from your open form?
If not select query design choose the tables you that keep
the info you need and in the criterea row click in the
relevent field and use the magic wand icon to ask the
query to get that crirerea from the form. If your form
does not hold the information you need have to change it
so it does. Combo boxes can display information from any
table so getting what you want on the form should not be a
probl;em
 
Matt

I came up with a way simlar to your check boxs. How about another table that stores slots used? The table would have fields for rack number (400), slot number (39) and server name (Server2). The after update event of the select rack combobox would show used slots by filling in text boxes on your form. Then you could see what slots are used and pick the number of a range of slots for the new server

Not the automated solution you were looking for, but maybe a start.....

Email me if you want to see a demo I whipped up. I am using Acc2K.
 
Back
Top