Access Proves “worth its salt” for IDOT

Today’s guest blogger is Joel Graff. Joel is a field engineer with the Illinois Department of Transportation (IDOT). He’s sharing how he utilized Access to prove the efficiency of their drivers and equipment in managing winter road conditions.

This last year salt prices skyrocketed on us (increasing threefold in some cases). As a result, upper management in IDOT insisted on using more "salt conservative" spreading policies when we apply salt to our roads during snowstorms. New policies were developed and handed out to our maintenance staff. Since IDOT maintenance is terribly understaffed, we triple our work force in the winter with temporary help, which only made abiding by the new policies more difficult.

To manage this challenge, I created a form that each plow driver I'm responsible for must fill out at the start and end of his or her shift. They record the tons of salt spread, the miles driven, and various other information.

Then, I take those forms and enter them into an Access database I wrote to help me track our salt usage. Over the course of the winter, I entered about 1,000 records into the database. I estimate that's about 1/4th of the total number of forms. At the end of the season, I did an informal statistical analysis on the data (including a histogram).

clip_image002

The above image is the general appearance of the database. I’ve found the split view is absolutely critical. I used the Split Form feature here, but often I still have to use my own implementation as the built-in feature is not exposed as a separate object to VBA.

In the General section of the form, the Storm, Teamsection, Shift, and Truck text boxes actually hide combo boxes. When the user clicks on the textbox, it makes the combo box visible (see below image). When the user leaves the combo box, the textbox reappears over top. To do this, I had to use the form’s timer event, otherwise I would run into control focus errors.

clip_image002[5]

Data entry is partially automated, based on the truck that is selected. As a result of carrying over values from previous records, I can cut the number of keystrokes required to enter a record by one half to two-thirds or possibly more. There are 22 bound fields on the current form and can enter a record in as few as 7 fields on average.

The Manage Lists section of the form allows the user to manage the data that makes up the database’s lookup tables. Clicking on one of these options brings up a list manager  (see the Subsection Manager image below). This is a form that’s actually based on a class I’ve written in VBA. Data is updated in the list box as it is typed in the form fields below. The form invokes its own instance of the class I wrote (“clsLookup”). The clsLookup object initializes the form by examining the form’s controls and determines which controls feed the list box data and which controls are used to filter that data. It saves me from having to continually recreate forms from scratch that all function essentially identically.  It also reduces code bloat and errors.

clip_image002[7]

When I proposed this to my maintenance staff, there was considerable resistance. "You'll never get them to fill out those forms!" and "Those electronic spreaders aren't reliable!" were the two most common objections. However, the results were quite valid. The forms were filled out, and with greater consistency than I'd anticipated. Further, the data indicated that our salt spreaders were accurately recording the data and our drivers really were doing what they were told! Without this database, there is no way I could possibly make that assertion with any quantifiable certainty.

In the near future, I will distribute the database to my maintenance yards so the yard supervisors can enter the information themselves and have it available for their purposes (they presently are required to track salt using antiquated software written in 1989). Any data they enter will automatically be submitted electronically, thereby saving me from having to manually enter several thousand records of data next year.

Further, I plan on incorporating a weather data feed so that I can correlate salt usage with varying winter conditions and examine how weather affects our salt spreading habits. That will probably pose the greatest challenge yet.

While this hasn't been my most complex Access project, it certainly proves to be among the most fruitful.

Office Blogs Comments

Comments: (4) Collapse

  • It would be good to see that working and understand the class that you have written - somthing that is currently beyond me I am afraid. Any chance you could post the database (less any confidential data of course) Thanks Kevin (England)

  • Nice application, I'd like to see the class you created, it gave me some good ideas for an application I am working on Brad Anderson

    (USA - New York State)

  • Intriguing idea, putting the text boxes over combo boxes. What was the issue that you were trying to address? What did this get you over just using a combo box?

  • Clint asked if I'd provide the class code, and I will be happy to once I have a chance to clean it up a bit... It's not perfect (I wrote it only a few weeks ago and haven't really had much chance to extensively test it or clean up minor refresh issues), but I'll be happy to pass it along. I make no claims that it's any great thing, just that it "works for me"... So far as the textboxes-over-comboboxes goes, it was purely an aesthetic issue. I had developed a "flat" interface (no 3D controls, for the most part), but the combobox control doesn't allow for a "flat" special effect for the down arrow. So, I figured the easiest way to deal with it was to hide the combobox unless it was needed. It's a perfectly superfluous reason for doing this sort of thing, but I was mostly curious to see if I could do it. In the end, I may just forgo it altogether. After all, to be consistent, I'd have to do the same thing with the comboboxes in the "Buckets" subform (which is a continuous form and likely a much more difficult proposition).

Comments

Comments: (loading) Collapse