Results 1 to 2 of 2
Thread: Access template (2K and XP)
2003-02-04, 17:44 #1
- Join Date
- Jan 2001
- Virginia, USA
- Thanked 1 Time in 1 Post
Access template (2K and XP)
Our local community college foundation is about to hold its annual "silent auction" fundraiser, and someone has asked me to help set up an Access DB to track bids and payments. They want to have two or three "cash registers"--actually just desktop computers where a volunteer will collect the payments and enter the information into the DB. So I went to Microsoft's template gallery in search of a predesigned DB that I can just modify to suit our particular purpose.
I settled on the Donations template, which is pretty close to what I want. I was doing OK as I studied the tables and relationships and reports, but I got stumped on the Switchboard. Can someone please help me with this thing they call a "Handlebutton." I know about command buttons, and I know that a command button on a form has code behind it that makes stuff happen when I click on it. This handlebutton, however, is new to me and I can't find any documentation for it.
I typed "handle" into Access Help and got little more than references to the sizing handles that appear on any object when selected. I looked in the index of my copy of "Access Inside and Out," but found no references there either.
So...it appears that handlebuttons are a variant on the command button concept, yes? But...how do they differ? How do I create such a handlebutton? Why would I want to use a handlebutton instead of a garden-variety command button? I create a command button with the toolbox, but I don't see anything there about handlebuttons.
2003-02-04, 18:34 #2
- Join Date
- Feb 2001
- Thanked 0 Times in 0 Posts
Re: Access template (2K and XP)
I'm assuming you are referring to the handlebuttonclick function in the switchboard forms module. This is a custom function that carries out instructions based upon the button on the form that was clicked. If you look at the click event in the button's properties sheet you will see that each button calls this custom function passing to it the number - or position on the form - of the button that was clicked. The custom function then uses this number to determine what instructions to carry out - open a form, report etc. It does this by opening the switchboard items table, and finding the record that matches the page number (switchboardid) and button number (itemnumber) of the switchboard form. It then uses the value in the command field and a select case statement to match the value to the constants defined at the beginning of the function.
But don't worry. You don't really need to know how this all works because there is a switchboard wizard that configures all of this for you. In XP go to the Tools menu/Database utilites and select the switchboard manager. From there you can configure which buttons you want to open which forms, reports etc.