Tag Archives: Access 2016

How to Create a Login Form for MS Access

Before creating a Login Form, you need to set up a user table that can verify the login ID and password on the Login Form. The step of creating Login Form can be followed below:

Create a table tblSecurity with a SecurityID and SecurityLevel field and add admin for SecurityID =1 and user for SecurityID =2

securitystep1

Create a table tblUser with a UserName, UserLogin, UserSecurity and UserPassword fields.  Remember to add an input mask on the password field so that passwords are not blatantly visible in the table.

securitystep2

I choose to display the type of user rather than just the raw number of the User’s security level by using the Lookup options in the design view. This way the UserType field is a number corresponding to the User’s security level because it refers to the SecurityID in the tblSecurity but displays the user’s UserType in text (admin, user etc.). You can create the UserType field from the Lookup Wizard on the dropdown of Data Type column.

usertype

Create a Login Form from the Dialog form design. Then customize the form to your liking.

how-to-create-a-user-login-form-in-ms-access

Create two text boxes in the Login Form as txtUserName with label Login Name and txtPassword with label Password

create-a-login-form-ms-access-2016

Under the “On Click Event” of the Cancel button, add the Embedded Macro with a QuitAccess command to exit the program or Access application

how-to-creat-a-login-form-macro

Create a Navigation and Admin Form area to reroute your users to the appropriate area of your database application.

Under On Click Event of the OK button, add the VBA code below under the Event Procedure

Option Compare Database

Private Sub Command1_Click()
Dim User As String
Dim UserLevel As Integer
Dim TempPass As String
Dim ID As Integer
Dim UserName As String
Dim TempID As String


If IsNull(Me.txtUserName) Then
 MsgBox "Please enter UserName", vbInformation, "Username required"
 Me.txtUserName.SetFocus
ElseIf IsNull(Me.txtPassword) Then
 MsgBox "Please enter Password", vbInformation, "Password required"
 Me.txtPassword.SetFocus
Else
 If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin = '" & Me.txtUserName.Value & "' And UserPassword = '" & Me.txtPassword.Value & "'"))) Then
 MsgBox "Invalid Username or Password!"
 Else
 TempID = Me.txtUserName.Value
 UserName = DLookup("[UserName]", "tblUser", "[UserLogin] = '" & Me.txtUserName.Value & "'")
 UserLevel = DLookup("[UserType]", "tblUser", "[UserLogin] = '" & Me.txtUserName.Value & "'")
 TempPass = DLookup("[UserPassword]", "tblUser", "[UserLogin] = '" & Me.txtUserName.Value & "'")
 UserLogin = DLookup("[UserLogin]", "tblUser", "[UserLogin] = '" & Me.txtUserName.Value & "'")
 DoCmd.Close
 If (TempPass = "password") Then
 MsgBox "Please change Password", vbInformation, "New password required"
 DoCmd.OpenForm "frmUserinfo", , , "[UserLogin] = " & UserLogin
 Else
 'open different form according to user level
 If UserLevel = 1 Then ' for admin
 DoCmd.OpenForm "Admin Form"
 Else
 DoCmd.OpenForm "Navigation Form"
 End If

 End If
 End If
End If
End Sub

Private Sub Form_Load()
Me.txtUserName.SetFocus
End Sub

Set the Login Form to display immediately when the Access Database is opened. Go to File->Options and select the Current Database option from the list. Then set the Login Form as the display form.

set-a-display-form-for-when-access-first-opens

It should be noted that while this login procedure is helpful to have permissions and different roles withing your Access database and may be needed for our Remote Desktop Hosting – it is not necessary for any hosted Access Web App or Sharepoint Application since you can use the Sharepoint user roles and login procedures rather than handling it within the Access Database itself.

Posted in Access 2016, Remote Desktop Hosting, Tutorial | Tagged , , | 51 Comments

Getting Started with an Access Wep App in Sharepoint

Note : This article is written for an Access 2013 web app using Access Hosting’s Sharepoint 2013 Enterprise plan, you will need Access 2013+ and this subscription configured for Access services.

Access 2013 introduced a new way to make a database available in the browser, called the Access Web App. This first article focuses the general features and points for consideration when developing your Access database.

With the release of Access 2013, you can create now create two different types of database applications, the first is the traditional desktop database. This has traditionally been called an Access database and consists of one or more files stored on your computer, network, or remote server with Access or the Access runtime installed so that you can open and operate these databases.

The second type of database application you can create is called a 2013 web app (not to be confused with the Sharepoint 2010 Web Database). These Web Apps can only reside within Sharepoint 2013 Enterprise or newer.  They are not created and do not reside on your local computer.

No need to publish design changes!

A web app is cleverly designed so that everything is hosted on Access Hosting’s private cloud, so while you are using a desktop copy of Access to work on changing your design, all the changes you make once saved are automatically saved up to our Sharepoint solution. This means that there is no publishing process, but it also means that you can’t easily undo your changes (or mistakes). Keeping a backup of your own work is very important, but Access Hosting also backs up your entire site collection (not just the web app) every night so we can restore your entire site from a major blunder.

Your web app can be placed in your personal folder in Office 365, or created in a Team Site/Subsite. Team Site/Subsites allow for you to both collaborate with other licensed users and what are known as external users. An external user is someone with a FREE Microsoft Online account (easily obtained), and you are allowed between 500/10,000 external users depending on your subscription.

Access Web Apps run in your Browser

Access Web Apps run in your browser. This is where most of your users will interact with your application. Web Apps do not have the same robust design features as traditional desktop based applications.  When designing a web app you will find yourself switching between your installed copy of Access on your desktop computer and the runtime browser window.  You’ll have to have Access installed on your computer to make changes and design the Sharepoint Web App, but will often want to reload your browser to see your changes take effect and to visualize the end user experience.

Simplified Design Tools

The MS Access interface used to design web apps is very different than the traditional design tool so you will need to spend some time getting used to the new interface. It is relatively simple and offers standard form views and formats to get an Access web app up and running quickly in Sharepoint.

Tables and Lookups

When designing an Access Web App, it helps to forget everything you already know about designing a traditional ms access desktop database application.

Web Apps do not have the customization options and power of a traditional access application (if you have a powerful Access application developed for the desktop, you can look at our Remote Desktop hosting which lets you leave your robust database application or custom software as-is while you move it to our private cloud). Don’t worry though, your ms access database still stores data in tables. In an Access web app, you can easily jump from table to table using the navigation included on the left pane of the browser.  Tables can be re-ordered, hidden, have the captions changed and a graphical icon changed. This acts as the primary method of navigating between parts of your application.

access web apps table view

You relate your tables together using a lookup. For those familiar with desktop databases then think of a web app lookup as a combination of desktop lookups and table relationships. There is no place in the web app to view all the lookups together, these are managed individually as part of the table design process.

Once tables are linked by lookups, Access will automatically create views of the data which link the data together using the lookups. For example in an order processing system, an order will have a lookup to a list of products in that order. Access will then automatically create a view including a list of related orders for each product.

If you don’t use lookups, then you will miss out Access saving you time by the process creating views of your data automatically. Once you have these different views of your data, you will find that some of them are exceptionally useful for viewing data from a different perspective. If you find something that you don’t like, you can remove it that view from the web app.

anatomy of an access web app

Views for displaying your data

When you select a table, then on the top right of the main screen area next to the table selector is the View Selector for the chosen table. Microsoft Access will automatically create a List (Details) View and Datasheet View (Big Excel Sheet). You can then add to, remove, re-order, re-title and change the views.

Easy Data Search

access web app search

The default List View comes with a built in search bar feature. By default, your web app will search every field for whatever you type in. Once again, Access does all the hard work for you.

Restrictions on Primary Keys

A web app only supports one kind of primary key which is an auto-incrementing number (this is similar to the Autonumber data type found in a traditional desktop database and the Access Web Services 2010 primary key restrictions). The key field will automatically be named ID, but you can rename it.

Working with Existing Data

Access has great features for importing data, but you should note that upgrading a database to a Web App is very much starting from scratch; You can import your data into your web app, but you will have to design all your views, reports, forms, and other functionality from scratch (mainly because web apps can’t do everything that a desktop database can).  Before you try an import an existing desktop database, make sure that you change your desktop database so that every table has an autonumber primary key, and every foreign key is a long integer. If you don’t do this then you will run into problems.

Certain legacy data types are not supported, and those fields will not be imported. OLE Objects and Attachments are not supported. Instead there is a new Image data type which supports .gif, .jfif, .jpe, .jpeg, .jpg, or .png formats (notice that the bmp format is not supported).

If you have data in Attachments or OLE Objects, then these will need to be extracted and held outside the database in separate files, the exception is for supported image formats in

Data stored in SQL

The web app data is held in a SQL database on Access Hosting’s servers, these are automatically managed as part of your Subscription and hosting plan. You can create as many web apps as you like with our plan and are only restricted by storage (which can be upgraded at any time).

Programming Macros

To program a web app you use macros (VBA is not supported!). There are two different kinds of macros. User Interface macros manage how a user interacts with you application interface. Data macros are used to perform operations on your data.

Connecting your Web App to a Desktop Database

While Access Web Apps DO NOT support VBA programming or provide a browser based reporting capability, you can use the Access Desktop application to link to your data online to perform more complicated actions. You can quickly and easily connect to your Access Hosting Web App to create reports and more.  Check out this tutorial and video on how to use this feature.

Posted in Access 2013, Access 2016, SharePoint 2013, SharePoint 2016, Tutorial | Tagged , , , , | Leave a comment

5 Unconventional Ways Microsoft Access Can Power Your Business

original (1)

Since it’s inception, Microsoft Access has been the go-to database for businesses of all shapes and sizes. Not surprisingly, as Access’s features and cloud capability have rapidly expanded over the years, so too have the different ways the technology is used. Here are a few of our favorites:

1. Employee Training

There are few things more valuable to a business than properly onboarding and training new employees. While for most companies the ROI on hiring and app developer for a training application wouldn’t be high enough to justify the cost, building them in house is an appealing option. And as the company’s hiring scales, moving the backend of the app to a server like Microsoft SQL Server will be a low-cost way to scale your training app with it.

2. Customer Relationship Management

For many small businesses, CRMs like Salesforce or Microsoft Dynamics are either too expensive or too cumbersome to implement. However, having accurate, up-to-date customer and prospect information is crucial to running client-facing departments . As an MS Access user, it’s more than likely that much of this data already exists there. By standardizing this information and creating relational tables for objects like leads and deals, you too can have a CRM without the cost and learning curve.

3. Displaying Access to Data

While we’re on the subject of prospects and customers, many of them will want to access some of the data that you store in your web database – for example, recent invoices or the date of their next appointment. You can easily deliver this data easily by offering them a form they can fill out on your site. ASP.NET forms can query a Microsoft Access online database directly, so by implementing them on your site, you can surface this data to your customers with limited effort from your developers.

4. Business Intelligence

If you’re like many, you’re using an endless string of VLOOKUPs in Excel to report on related data from different tables or sources. This is really a job for Microsoft Access’ relational tables. Built on top of Microsoft’s Jet Database Engine, you can use these powerful tools to easily create queries that quite literally fly.

5. Development Waterfalls

If you’re in software development, one common practice you’re likely familiar with is creating waterfall models to manage the progress of an application. Since you may be creating an application that leverages Access or SQL Servers as your backend, why not keep track of your app’s progress there as well?

These are just a few of many ideas for uses for MS Access – the beauty of the software is that it’s uses are really only limited to the imagination<.

Posted in Access 2010, Access 2013, Access 2016, Access Developer, blog, SQL Hosting, SQL Server 2012 | Tagged , , , , | 1 Comment

3 Great Reasons to Choose Microsoft Access

link-to-outlook

The database market is divided among four major players: MS Access, Oracle, SQL Server and MySQL. Due to accessibility and focus on user interface, MS Access has garnered some negative press as being unsuitable for professional level database development. However, depending on the needs of the organization, there are many compelling reasons to choose MS Access as your business database software.

1. It’s widely distributed

MS Access is bundled with the MS Office suite, making it the most widely available desktop database program in the world. This also makes it one of the most affordable options for businesses, which tend to purchase businesses licenses of MS Office. The common interface among all the MS Office programs makes it easy to import and move data to and from the database without having to resort to specialized software. Due to the popularity of the product, support for MS Access is also very good, with plenty of online tutorials and articles available, in addition to Microsoft’s excellent customer service.

2. It’s user-friendly yet powerful

One of the main benefits of MS Access is its ease of use. Even users new to database development can pick up the basics quite easily, as everything is presented in an intuitive manner. Much of the user interface in MS Access is designed to assist users with creating and editing tables, and there are many templates available to ensure that the database meets organizational needs. MS Access also provides options for importing data from other databases, and provides troubleshooting tips for every step of the way.

Despite this focus on ease of use, MS Access users have access to powerful SQL tools that allow for rapid development. MS Access is also .NET friendly, meaning that developers wanting finer control of software development can take advantage of the ease of use and functionality of MS Access.

3. It has excellent third-party support

Due to the widespread popularity of MS Access, there are many third-party plugins and developmental tools that are available. This means that MS Access is far more flexible than other databases, making it easier to customize and adapt to the changing needs of your business. In addition, there are many more external consultants well-versed in MS Access, and they are generally more affordable than consultants for Oracle and SQL Server.

MS Access is an excellent database choice if your organization requires a database that is easy to use and that has established, reputable support structures. MS Access is powerful enough to meet the demands of most small to medium businesses.

Best of all you can utilize Access Hosting superior hosting infrastructure to further bolster your Access Database and get it in the cloud easily and securely.  All of our services offer a free 30 day trial so that you can easily test everything with Microsoft Access to make sure that it meets your needs.

Posted in blog, News | Tagged , , , , | Leave a comment

MS Access: How to Create Query Joins

IC285555

The foundation for any database software, like MS Access, is the ability to send a query. Organizing information and making it accessible on demand is what makes database software so powerful. Understanding how to craft queries can be challenging at first, but once you understand how to use select, action, parameter and aggregate queries, then you’re on your way to expertise. For truly complex queries and more complete data sets, you need to understand what query joins are, what they do and how they work.

Types of Queries

When working with an online database, there are four basic types of query joins: inner, left, right and full. These descriptors tell you where the web database is looking for the requested information.

  • Inner – An inner-query join allows you to search both tables and get results that match the query from either of the tables.
  • Left – A left-query join returns results that match the query from the left table and all matching rows from the right table.
  • Right – A right-query join works the same as the left join, but it uses the right table as the starting point.
  • Full – A full-query join returns any results where there is a match in one of the tables.

Exploring the “Join Properties” Dialog Box

When creating join queries, you must first create joins between tables and relationships between fields. When the “Join Properties” dialog box pops up in the Access web app, you will see three sets of options:

088f9d7e-3dea-4072-b5ff-38dab90cd459

First, you will need to select the left and right tables you want to join. There will be a drop-down list with all of the available tables. Designate the first one you want to work with as the left table and the second as the right table.

Query_Join

Next, you will need to select the columns to look at for each query. This allows the database on the web to only search for information in relation to those columns. There will be a drop-down list with all of the column names available. Select the column on the left and right tables you will be working with.

At the bottom of the dialog box are three options. These options are for creating a left, right or inner query. Select the type of query you want to use and move on to creating output fields.

Using join queries effectively allows you to do things like segment your mailing list for targeted marketing, find customer accounts more quickly and accurately, build customized reports and more.

Posted in Tips & Tricks | Tagged , , , | Leave a comment

What’s new in MS Access 2016…not too much

Microsoft did not bite off any major changes between Access 2013 and 2016. Nothing major changed (like the move from Web Databases to Web Apps from 2010 to 2013) and there are mostly just some enhancements and more robust design options.  Here are some of the features outlines by Microsoft:

Do things quickly with Tell Me

You’ll notice a text box on the ribbon in Access 2016 that says Tell me what you want to do. This is a text field where you can enter words and phrases related to what you want to do next and quickly get to features you want to use or actions you want to perform. You can also choose to get help related to what you’re looking for.

tellme msaccess2016

Can’t find a button? Click inside the Tell Me box (it’s the box at the top, with the light bulb). Type a button or command, like “filter”, and you’ll see all of your filter-related options listed for you.

Keep in mind that the the Tell Me box is not available in the ribbon when designing Access web apps.

Export linked data source information to Excel

Have you ever wanted to get a nice list of all the linked data sources from your Access database application into MS Excel? If you are working on a complex Access application, for example, that includes links to many different data sources, it can be helpful to have a nice list of all the various data sources and their types. This exported list can be especially helpful if you are working on an Access application you did not originally design. Now with Access 2016, you’ll find this task much easier using new functionality built into the Linked Table Manager dialog.

export to excel

Open the Linked Table Manager dialog by clicking External Data > Linked Table Manager. Select the linked data sources you want to list and then click Export to Excel.

Once again, please note that this feature is not available when designing Access Web Apps.  Are you seeing a trend here?

Larger Show Table dialog

In Access 2016, the default height of the Show Table dialog has been increased so you can easily see more table and query names in your database.

larger table view

To view the Show Table dialog in queries, click Create > Query Design. The Show Table dialog opens by default. You can also open this dialog in queries by clicking Design > Show Table. To view the Show Table dialog in the Relationships window, click Database Tools > Relationships. The Show Table dialog opens by default. You can also open this dialog in the Relationship window by clicking Design > Show Table.

Once again, please note that the Relationships window is not available in Access web apps.

New visual themes and templates for the Access program

As mentioned a lot of the improvements to Access 2013 come to aesthetics.  There are now two Office themes that you can apply to the Access program: Colorful and White. To access these themes, go to File > Options > General, and then click the drop down menu next to Office Theme.

assets database template

If you want to organize and manage your data with Access but you’d like some help getting started with designing the database, try using a desktop database template. In Access 2016, five of the most popular database templates have been redesigned to have a more modern look and feel. To try these templates out yourself, go to File > New, and then search for any of these:

  • Desktop Assets
  • Desktop Contacts
  • Desktop Events
  • Desktop Students
  • Desktop Tasks

Each of these templates includes a new Getting Started form with links to articles, videos, and other community resources.

Posted in Access 2016 | Tagged , , , | Leave a comment