10.3. Other Useful Items

 < Day Day Up > 

There are a few other useful things that you can do when designing a user form. You might notice that the text boxes are aligned with the labels, and the left and right margins of each are also aligned. If you attempt to do this using only your eyes, you may have some difficulty. The easiest way to do this is to make the sizes the same using the properties dialog's height and width properties. You can drag one text box or label to the right size, look at the height and width properties, and set the properties of the other text boxes to be the same. Then, when you want to align the text boxes or labels, click and drag to select the text boxes or labels that you want to align, go to the top menu and select Format Align, and choose whether you want Lefts, Right, Tops, Bottoms, Centers, or Middles. This automatically lines up your controls.

If you need the user to enter a range, there is an object that you can put on a user form that makes it very easy to do. It is called the RefEdit control and is on the bottom left of the control toolbox. When you put it on the user form, the user clicks on it and selects a range which is stored as a text value A1-style reference and can be retrieved using the Value property.

The other control that I use quite a bit is the MultiPage control. This lets you use one form while allowing you to gather a lot more information. It also makes it nice when you want to break up the data entry into pieces. I have used this control in cases when I allow the user to select multiple parameters to search records, as well as when retrieving information from a database. For example, have one page that displays contact information, and have another page that displays sales information, etc. You can probably come up with a lot of examples. It is a very nice control to use, particularly because most users are used to seeing multi-page forms when they edit properties in many Windows programs.

     < Day Day Up > 

    Integrating Excel and Access
    Integrating Excel and Access
    ISBN: 0596009739
    EAN: 2147483647
    Year: 2005
    Pages: 132

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net