<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener("load", function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=34083602&amp;blogName=LEARN+MS-ACCESS+TIPS+AND+TRICKS&amp;publishMode=PUBLISH_MODE_FTP&amp;navbarType=BLUE&amp;layoutType=CLASSIC&amp;searchRoot=http%3A%2F%2Fblogsearch.google.com%2F&amp;blogLocale=en_US&amp;homepageUrl=http%3A%2F%2Fwww.msaccesstips.com%2F" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" allowtransparency="true" title="Blogger Navigation and Search"></iframe> <div></div>
www.msaccesstips.com

LEARN MS-ACCESS TIPS AND TRICKS


International Response Fund

LEARN MS-ACCESS TIPS AND TRICKS

↑ Grab this Headline Animator

Your Ad Here
Wednesday, June 20, 2007

Control Screen Menu Design

We have seen in the earlier topic on Control Screen Design that we can display several Menus at one place. Let us look into a simple design with 2 Menus and how they can be displayed at the same place interchangeably. We need two Tables, one for Data Files List and another one for Reports’ List. You can use the same Table that we have created for the Opening Access Forms topic. Make a copy of it and rename it as ReportList.

Table for Listbox (click)




  1. Open a New Form in design View.

  2. Click on the Tab Control Button on the Toolbox and draw a Tab Control on the new form's detail section as shown below:


  3. Form in Design View

  4. Click on the second page of the tab control where page2 is shown and display the property sheet. Type Reports in the Caption Property.

  5. Click on Page1 and Type Data Files in the Caption Property.

  6. Now we need to create a List Box. Before clicking on the Listbox button on the Toolbox ensure that the Control Wizard (the button next to the arrow button) is selected on the Toolbox.

  7. When you point the arrow on the Tab control Page, after selecting the listbox control, the Tab Control Page will highlight with a black background where you can position your listbox. Draw a Listbox with the size of your choice.

  8. The Listbox Wizard starts up. Select the Data Files Table and select Seq & Desc fields from the Table and click Next. Select Seq field for sorting in Ascending Order and click Finish.

    We
    needs to re-organize the Listbox and the Tab Control as its size and placing have changed. Select the child label of the listbox and delete it. Click outside the tab control and drag the mouse over it (or click on right of the tab-page projections, right of page2) to select the Tab Control and drag it towards right, giving enough space at left side for creating command buttons later, if its position was changed too close to the left border. Change the Listbox’s size to your liking.

    We are concentrating only on the designing aspect of the controls not running its options from the listbox, which we have already discussed under the topic Opening Access Forms.

  9. Click on the Listbox and display its Property Sheet. Note down the following Property Values:

  10. • Left
    • Top
    • Width
    • Height

  11. We need to create a 2nd Listbox on 2nd Page of the Tab Control. Instead of going through the wizard method we will do it differently. Right-click on the Listbox on first page and select copy from the shortcut menu.


  12. Click on the 2nd Page (Reports) tab to select it, press and hold the Shift Key then right-click on the tab page and select paste from the short cut menu. The List box from the first page is copied to the 2nd page. To change its Row Source, display the property sheet and click on the Row source property and select the build (…) button at the right side. The Query Design window is on with the DataFiles Table in it. Click on the Show Table Button on the Tool Bar above and select the ReportList Table. Change the Fields and the Table Names in place of Datafiles table to ReportList Table and Fields. Delete the Datafiles table from the design and close the window to save the changes.

  13. Display the property sheet of the Listbox of 2nd Page, if it is not already visible, and change the values of the above properties (Top, Left, Width & Height) to the same value that we have noted down from first page. Change the Fill Color and the Font Color to something different like blue background and white font color.

  14. Select the tab control using one of the methods explained under item 7 (2nd paragraph text in bold italics) above and display the property sheet. Change the following Property values:

    • Name = TabCtl0 (Zero at the end)

    • Back Style = Transparent

    • Multirow = No (default)

    • Style = Buttons


  15. Save the Form and open it in Form View. Because of the above property change you can hardly say it is a Tab Control. Click on the buttons on the top one after the other to display the Data Files & Report Menus and we can see both the menus are sharing the same space for displaying their contents.

  16. If you don’t like the Buttons on the top, create two Command Buttons at the left side, one below the other. Name the First one as cmdDF and change its Caption to Data Files. Name the second Button as cmdRpt and change its Caption to Reports.

  17. Select the first Command Button and display the Property Sheet. Add a line of code in the On Click Event Procedure:


Private Sub cmdDF_Click()

Me.TabCtl0.Pages(0).SetFocus

End Sub

Write the following code in the On Click Event Procedure of the 2nd Command Button:

Private Sub cmdRpt_Click()

Me.TabCtl0.Pages(1).SetFocus

End Sub


Tab Control in Design View


16. We need to make one more change on the Tab Control's

Style Property = None

to make the top Buttons to disappear and then save the Form. Open it in Form view and try out your design.

If you need more menus, you can add more Tab Control Pages from the Insert Menu after selecting the Tab Control. Repeat the design process with Listboxes and Command Buttons as explained above.

Labels:

0 Comments:

Post a Comment

Note:Comments subject to Review by Blog Author before displaying.

Links to this post:

Create a Link

<< Home


Creative Commons License
Learn MS-Access Tips and Tricks by msaccesstips.com is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 India License.



This Page is best viewed with 1280 x 1024 Resolution

   FEATURED LINKS
SITEMAP
Command Button Animation
3D Headings on Forms
MsgBox & Office Assistant
Reminder Ticker
MS-Access & E-Mails
Automated E-Mail Alerts
MsgBox with Options Menu
Colorful Command Buttons
Configure Lotus Notes
Alerts through Network
Running this site has become a costly affair as the revenue from Ads is not sufficient to support it. If you find these pages informative & useful and would like to extend a helping hand, then please do it here.





Link Back to us with this Button

Learn MS-Access

Copy and Paste this HTML Code in your Webpage


Add to Technorati Favorites

Programming Blogs - Blog Catalog Blog Directory
Powered by FeedBurner
Add to Google

Software
Computers blogs
TopOfBlogs




AddMe - Search Engine Optimization Submit Your Site Free!
Go BlogZ Ave Blogs
eBlogzilla Changing LINKS
LS Blogs Blogarama
blog search directory BlogUniverse
Find Blogs in Directory RSS Directory
blogskinny.com ShowcaseBlogs.com
Amfibi

Search Engine Optimization and SEO Tools
Dmegs Web Directory Takeaway for Sale Businesses For Sale
Free Submission Directory Free site submission

Free Listing
 





Free Page Rank Checker

AddThis Social Bookmark Button

Enter your email address:

Delivered by FeedBurner



Top Blogs


Microsoft Access is the Jewell among MS-Office suite of Applications. Its Security features are excellent and works fine in Network environment. MS-Access can link/upload data from any Data Source. Applications that you design should be user-friendly and visually pleasing too. Here I would like to share my experience in Microsoft Access Programming with you and I am sure that you will find them interesting too.

My Photo
Name: Ramachandran Pillai
Location: Cochin, India

I am not an Access Guru and not through MS-Access yet. More to learn and I don’t think that aspect has any end because others have their own style of using this tool. We can learn lot more tricks, other than what we already know, from others too. My programming skills in COBOL, BASIC, Turbo-C, dBase, FoxPro, Visual Basic & Basic HTML attained through self-learning. I wrote my first COBOL Program in 1975 for ICL1901, 3rd Generation Main Frame Computer. Worked as a Computer Operator (NCR VRX8555 Mainframe Machine upto 1990) with M/s. Y.B.A. Kanoo, Saudi Arabia. Started using MS-Access Ver.2 in 1996, when dBase III+ and Foxbase (later version Foxpro) were my favorite DBMS. During Last 13 Year period I have developed more than 45 In-House Applications (medium & small) under MS-Access for our Organization, a leading Automotive Company in Oman. All the Applications are fully Secured and runs under Windows Network. It is my pleasure to share my experience with others. Anything interesting that you would like to share with me, please do. My E-mail Address: aprpillai@msaccesstips.com


If you need a Demo of any of the Topic explained here, send me an E-mail to: aprpillai@msaccesstips.com
with the Topic Description, I shall try to send a sample database to you.


Access Tips | Email | Reports | Report Tricks | Graphs | Forms | Menus | Animation | Security | Internet | How TOs | Linking | Query | Progress Meter | Alerts | Process Tips | Access Functions |




Site Designed by:www.msaccesstips.com