Showing posts with label forms. Show all posts
Showing posts with label forms. Show all posts

Sunday, May 1, 2011

Microsoft Access: Web Browser Control


I love how on websites you can click to view a map. Somehow the address fields are set to map to a mapping program, such as Google Maps or Mapquest, and you’ll see a map to your destination. You can now replicate this on your Access forms using the Web Browser Control.

First, go to your favorite map site (I found deciphering Map Quest was easier), type in your address (you'll delete this later) and locate it on the map. Copy the URL.
  1. On the Form Layout Tools|Design ribbon, in the Controls group, select the Web Browser Control, and then click to place it on the form. Access opens the Insert Hyperlink dialog box.
  2. Paste the URL of the web page into the Address: field of the Insert Hyperlink dialog box, and then press TAB on the keyboard to move to the next field. Access clears the Address: field and separates the URL into the appropriate fields.
  3. To set the control so that its URL changes based on the data that is displayed on your form, you must replace the appropriate URL components with expressions that refer to the appropriate controls on the form. Here's where having your address helps you locate the correct areas for your fields.
    1. Click the path or parameter that you want to replace, and then click the Build button.
    2. In the Expression Builder, double-click the control that contains the data you want.
    3. Click OK to close the Expression Builder.
  4. Click OK.

    Sunday, November 1, 2009

    Microsoft Access 2007: Have Access forms automatically close after use

    If your users work with multiple Access forms, here’s how to make their work easier by having a form close automatically once they are finished with it:

    1. Open the first form in Design view.
    2. Double-click the Form Properties button.
    3. Click on the Event tab.
    4. Click in the On Deactivate text box.
    5. Select Event Procedure.
    6. Click the Build button.
    7. At the prompt, enter: Me.TimerInterval =1.
    8. Press ALT+Q.
    9. In the Form Properties window, click in the On Timer property text box.
    10. Select Event Procedure.
    11. Click the Build button.
    12. At the prompt, enter: DoCmd.Close.
    13. Press ALT+Q.
    14. Save the form.


    Wednesday, October 1, 2008

    Microsoft Access 2007: Use charts to display data on Access 2007 forms

    Access 2007 makes it easy to build a graph control for your form that will display calculated data — and often better than with a text form control. For example, say your employee database includes two tables: one with employee data and one with data about hours worked during 2007. The database also contains a November Hours Worked query that includes the Last Name, First Name, and Employee ID fields from the Employee Data table, and the Week Ending and Hours Worked fields for November from the 2007 Hours Worked table. You create a form based on the query that includes all of the fields. To add a chart to the form that graphs the total hours worked for each employee for the month of November, follow these steps:
    1. Open the form in Design view.
    2. In the Forms Design Tools, Design ribbon, in the Controls group, click the Insert Chart tool.
    3. Click and drag in a blank area of the form to create the chart.
    4. Select Queries under the View section and then select the November Hours Worked query and then click Next >.
    5. Double-click the Last Name and Hours Worked fields.
    6. Click Next > four times.
    7. Enter Total Hours Worked In November for the chart title.
    8. Select No, Don’t Display Legend and then click Finish.
    As you click through each employee’s record, the Graph control will display a bar chart for the employee, showing the total hours they worked in November 2007.