Awards
Join OfficeTipsAndMethods

Have some suggestions to share with the world?

Join OfficeTipsAndMethods and share your insight in a Comment. You must be a member to comment and all comments are moderated before being published. Membership is free and we would never share your personal information with anyone.

Become an OTM Member

Log In

YouTube Video Channel
OfficeFix
Article Categories

Posts Tagged ‘Access’

Access Now Included in Office 365 Roadmap

Exciting news for the Access community – for the first time Access now appears in the Office 365 Roadmap. See this UtterAccess news announcement. TheSmileyCoder, one of my UtterAccess colleagues has posted a review here. Use this link to go directly to Access features currently listed on the Roadmap.

Web Enabling your Application

Access 2010 now allows you to easily publish your application to the Web for sharing with other users. This process has been simplified by using Microsoft’s SharePoint Online, part of the Office 365 suite, as no local placement of a SharePoint server is needed. When you share the app with others, all they need is a Web browser to work in your Database Application.

Publishing your Application

One of the common uses of Data Macros is to validate data being entered into a record. The following example will stop the creation of a record in the Asset table if the user is trying to add a warranty value if they have not entered an Aquired Date.

Procedure: Publishing your Application

1. Open the Database Application to be published.

2. Select the Backstage View ribbon tab.

3. Click the Save & Publish option and then Publish to Access Server.

image

4. Enter the full address of your online SharePoint server. Enter the credentials to the SharePoint site, and click the Publish to Access Services button.

image

If successful and Access can publish to the given site, the Web Browser will open and display your published site – distribute the URL to users who need to access the Application via the Web.

This article was written by Nick Williams. Nick is one of the Access course tutors at Acuity Training, a hands-on IT training company with offices in central London & Guildford UK.

Data Macros

Use Data Macros to add logic to events that happen in Tables, this could be adding records, updating a record or deleting data. Data macros are created and managed from the Table ribbon tab while you are working in the table view. There are two main types of data macros

  • Event Driven, which are those triggered by table events.
  • Named, which run in response to being called by name.

Creating a Data Macro

One of the common uses of Data Macros is to validate data being entered into a record. The following example will stop the creation of a record in the Asset table if the user is trying to add a warranty value if they have not entered an Aquired Date.

Procedure: Create a Data Macro

1. Open into Data Sheet view the Table you are adding the Data Macro to.

2. Select the Table ribbon view tab.

image

3. Click in this instance the Before Change button.

4. Within the Macro screen, add the necessary actions you require. This example shows an If program flow

image

Add the necessary values

image

 

 

 

 

 

 

 

 

 

 

 

5. When you have completed the Macro, Save and Close the Data Macro.

image

The next time a new or edited record does not meet the validation set, the following message will appear and stop the update of the Record.

image

Procedure: Edit a Data Macro

1. Open into Data Sheet view the Table you wish to edit the Data Macro for.

2. Select the Table ribbon view tab. You will notice the Event button will appear yellow if there is already a Data Macro created.

3. Select the relevant Event button and make the necessary changes.

image

4. When you have completed the Macro, Save and Close the Data Macro.

Procedure: Delete a Data Macro

1. Open into Data Sheet view the Table you wish to Delete the Data Macro for.

2. Select the Table ribbon view tab.

3. Select the relevant Event button and make Delete the changes for.

4. Within the Data Macro screen, remove each command by selecting the at the top right corner of the command.

image

5. When you have completed the Macro, Save and Close the Data Macro.

image

This article was written by Nick Williams. Nick is one of the Access course tutors at Acuity Training, a hands-on IT training company with offices in central London & Guildford UK.

Finalizing Your Application

Once your database design is complete, it can be very complex with many Tables, Forms, Queries and Reports which in most cases the user will only need to use directly a small number of. To enhance the user experience and usage, we generally use switchboard menus (a collection of specially created forms) for the user to navigate around the Database.

As they will have the relevant tools available via these forms/buttons, the Ribbon, QAT and Navigation Pane are really redundant to them, and hiding them will tidy up the appearance of the database and also ensure no unexpected access features are selected.

Hiding the Ribbon

Using your Current Database options, you will generally set a Form to open when the Database is opened by the user. This Form we will create some code which will hide the Ribbon when the form is opened and again Show the ribbon when the Form is close.

Procedure: Hiding the Ribbon

1. Open within Design view the Form that is displayed when the Database is loaded.

2. Select the Design ribbon tab and click on Property Sheet to display.

image

3. Within the Property Sheet window, select the Event tab and click the three dots button next to OnOpen event.

image

4. Select the Code Builder option from the presented list and click OK.

image

5. The Visual Basic Editor window will now display, ensure the following red text is entered as shown below.

DoCmd.ShowToolbar “Ribbon”, acToolbarNo

image

6. Select the save button and close the Visual Basic Editor window.

Now you have the code set to hide the Ribbon while this specific form is opened, you will need to complete the next task to show the Ribbon again when the form is close.

Showing the Ribbon Again…

Once you have entered the code to hide the Ribbon, when you close your database the Ribbon will always be hidden. We resolve this problem by adding the code to the OnClose event of the Form to show the Ribbon again. .

Procedure: Showing the Ribbon

1. Open within Design view the Form that is displayed when the Database is loaded.

2. Select the Design ribbon tab and click on Property Sheet to display.

3. Within the Property Sheet window, select the Event tab and click the three dots button next to OnClose event.

4. Select the Code Builder option from the presented list and click OK.

4. The Visual Basic Editor window will now display, ensure the following red text is entered as shown below.

DoCmd.ShowToolbar “Ribbon”, acToolbarYes

5. Select the save button and close the Visual Basic Editor window.

Once the database is closed, each time it is opened the form will launch and the Ribbon will be hidden and then shown once the form is closed.

Hide the Navigation Pane

To ensure your general user audience cannot gain access to all of the database objects – only the ones you give them access to via a switchboard, hiding the Navigation Pane is the answer. This feature is set by database, even though you have hidden the Navigation Pane from one Database Application, it will re-appear for others.

Procedure: Hiding the Navigation Pane

1. Open the database you wish to hide the Navigation Pane for.

2. Select the File Backstage View button and click on Options.

3. Within the Options dialog box, select the Current Database section.

image

4. Locate the Navigation section and de-select the Display Navigation Pane check box.

image

5. Click OK to save the option change.

6. You will be prompted with the following dialog box, you must close the database down and re-open it for the change to take effect.

image

7. To display the Navigation Pane in this Database again, repeat the above steps, selecting the Display Navigation Pane check box.

This article was written by Nick Williams. Nick is one of the Access course tutors at Acuity Training, a hands-on IT training company with offices in central London & Guildford UK.

Access Image Gallery

image

Use the Image Gallery to provide an easy way to add, reuse, and update images on forms and reports within your Database application.

Once an image is inserted onto a form or report, it is automatically added to the Image Gallery, and becomes part of the database. From that point on you can quickly add the image to any other forms or reports in that database.

When you update the image in the Image Gallery, it will automatically update any other occurrences within your database.

Adding to the Image Gallery

When an image is added to a Form or Report, the image will automatically be added to the Image Gallery. However, during your scoping and design of the Database, you will highlight logos and other images that will be repetitively used within the design objects, these can be added ready to be used at a later stage.

Procedure: Add a Gallery Image

1. Open any Form or Report into Design View.

2. Select the Design Ribbon tab and click on Insert Image.

image3. Select the Browse option, and locate your image within the Insert Picture dialog box

image

4. Select the image and click OK.

Repeat the above procedure until all your images have been added to the Image Gallery.

Amending an entry in the Image Gallery

Once in the Image Gallery, your image can be Renamed, Updated or even Deleted. If you Update an Image, all occurrences of the image that have been used in the Database application, will automatically be updated. If the image is Deleted, every occurrence of the image will be replaced with a blank image control, you will need to then manually update the control to fill with the new image.

Procedure: Add a Gallery Image

1. Open any Form or Report into Design View.

2. Select the Design Ribbon tab and click on Insert Image.

3. Right mouse click on the image you wish to amend.

4. Select the required option from the shortcut menu.

This article was written by Nick Williams. Nick is one of the Access course tutors at Acuity Training, a hands-on IT training company with offices in central London & Guildford UK.

Sharing Reports

We’d like to welcome guest blogger Nick Williams. Over the next few weeks, Nick will be publishing a series of Access-related tutorials. Nick is an Access tutor based in the U.K.

If a group of users do not have access to your Database Application, share data with them by exporting Reports. Select the file format you want to save in—Excel, PDF, HTML or other format.

This process can be performed on a regular basis, you are able to save the export steps and run them again easily. Additionally you are able to create an Outlook Task while saving the export steps, this will not only remind you when it’s time to export the report, but also a Run Export button will be added to the Task automatically, so you can run it from within Outlook.

Procedure: Setting up an Export Reportimage

1. Right click on the Report to be exported within the Navigation panel.

2. Select Export, and choose the format to be exported to.

3. Within the Publish dialog box, select the location and enter the filename to be used.

4. Point and click Publish.

 

 

image[11]image

5. You will now be prompted to save the Export Steps. Once the checkbox has been selected, enter a Save As name and Description.

If you would like to have a task prompt you when the export is due to run again, select the Create Outlook Task tick box. Click Save Export to continue.

6. If the Create Outlook Task has been selected, ensure the correct Date/Time and Reminder are set within the Task.

Procedure: Running a Saved Export

1. Select the External Data ribbon tab and choose Saved Exports.

image

2. Within the Manage Data Tasks dialog box, select the Saved Export and click Run.

image

Also, if you have a Task setup in Outlook, you are able to open the Task and click the Run Export button within the Task ribbon tab.

Click OK to confirm the running of the Export Report.image

 

 

 

 

 

 

 

This article was written by Nick Williams. Nick is one of the Access course tutors at Acuity Training, a hands-on IT training company with offices in central London & Guildford UK.

Access Naming Oddity

MIniBikeAs a design principle, I apply a naming convention when creating new database objects. For example, field names begin with a lowercase letter. Recently, I was putting together a small application in Access 2010 beta so that  I could gain a little familiarity with the new Access version that will be released later this year. In a weak moment, I accidentally named some of the fields in a new table with uppercase first letters.

In the grand scheme of things, this is not a particularly serious problem but inconsistently formed names lend an unprofessional look to an application. When I tried to correct the names I discovered an inconvenient quirk. After replacing the first letter of each field name with its lowercase equivalent, saving and closing the table and then re-opening it again in design view, I found that the first letter of each field name had changed back to uppercase.

No matter what I tried, I couldn’t get the lower-case letter to ‘stick.’ That’s when I turned to my favourite forum for help. Thanks to UtterAccess VIP member (and Access MVP) datAdrenaline, I quickly had a reasonably workable solution.

Quote of the Day

I have never been especially impressed by the heroics of people who are convinced they are about to change the world. I am more awed by those who struggle to make one small difference after another.

– Ellen Goodman

All I had to do is change the first letter of each field name I wanted to modify, save and close the table, re-open the table and replace whatever I had entered as the first letter of the temporary field name back to the lowercase letter with which I wanted to start the name. Step by step this is the method I applied:

  • open the table in design view
  • pre-fix each field name with a single letter
  • delete and replace the original uppercased letter
  • save and close the table
  • reopen the table in design view
  • remove the leading character for each field to correct name
  • save and close the table

This problem occurred specifically in Access 2010 beta so it may be a non-issue when the new version is released but if you run into similar situations perhaps a similar approach will help you out of a bind “when all else fails.”

New articles in Access Wiki

Links

CamelCase

Access: What is it?

One Million Downloads and Counting

Big news last evening from the Office 2010 Microsoft Office 2010 Engineering Blog: in the two weeks since the public release of the Office 2010 beta more than a million people have downloaded it. There is a lot of excitement out there about this new Office release. See for yourself by downloading your own copy from http://www.microsoft.com/2010/ Remember, however, that this is a beta release so follow the installation instructions carefully

John R. Durant’s WebLog : Why VBA Still Makes Sense

This article, John R. Durant’s WebLog : Why VBA Still Makes Sense , presents a solid case  for why VBA is the ‘next level’ when it comes to application development in Access and other members of the Office suite. John provides an excellent of VBA since its early days to the present and on into Office 2010 including his perspective on the ‘fit’ between .NET and VBA. John R. Durant’s WebLog : Why VBA Still Makes Sense is definitely a worthwhile read.

Breaking News – Major Step Forward in Access 2010

Ryan McMinn and Clint Covington demonstrate the most significant new Access feature being introduced in the 2010 version View the Office Team Blog Article and click the link to their video .