Locked lesson.
About this lesson
Learn how to create a database, save it to a specific location, and how to open existing databases.
Exercise files
Download this lesson’s related exercise files.
2.02 creating-saving-and-opening-databases - Exercise.docx53.6 KB 2.02 creating-saving-and-opening-databases - Exercise solution.docx
108.3 KB Contacts01.accdb
1 MB TechGurusTicketing.accdb
552 KB
Quick reference
Creating, Saving, Opening, and Closing Databases
In this lesson, we will practice reopening existing databases, opening new blank databases, saving databases, and closing databases. We will also start to explore the concept of database tables and why they are useful.
When to use
Opening, closing, and saving databases are fundamental skills in Access that we use constantly when maintaining and managing databases.
Instructions
Re-opening a database
To re-open an existing database:
- From the Start screen, in the Recent or Pinned list, click to open the contacts database.
- Close the Welcome screen.
- OR, from the Start screen, click Open.
- Browse to the folder where the database is stored and click Open.
Saving a database
Databases by default will be given generic names e.g. Database04.accdb. We can rename it to make the database easier to identify.
- From the File tab, click Save As.
- Click Save Database As.
The default file type for Access databases is .accdb.
- Select Access Database (*.accdb) from the list.
- Click the Save As button.
A message may pop up that says 'All open objects must be closed prior to continuing this operation.' We cannot save a database if any of the elements of the database such as tables are open.
- Click Yes to close the objects.
- Browse to the folder where the database is to be stored.
- In the File name field, type 'Contacts01'.
- Ensure the Save as type field is set to the default Access database file format.
- Click Save.
- Close the Welcome screen.
- Click Enable Content.
Closing a Database
- From the File tab, click Close.
Using this method will close just the database that is currently open. If we click the X in the top right-hand corner, that will close Access entirely and all open databases.
Opening a Database
- From the File tab, click Open.
- Browse to the folder where the database is stored.
- Select the database and click Open.
Creating a Blank Database
- From the File tab, click New.
- Select Blank database.
- Rename the database 'TechGurusTicketing.accdb'.
- Select a folder to store the database in.
- Click the Create button.
Tidying up the file pathname
- From the Start screen, re-open the database 'TechGurusTicketing.accdb'.
Before we create our first table, let's tidy up the messy pathname that's showing in the title bar.
- From the File tab, select Options.
- Click Current Database.
- In the Application Title field, type 'TechSalesTicketing'.
Blank Database Elements
Blank databases don't contain any database elements such as populated tables, reports, or queries. The only thing a blank database will usually have is an empty table called 'Table 1'. A table contains rows and columns and each table is displayed in its own tab.
Tables are the building blocks of all databases and we can have multiple tables in one database.
Hints & tips
- When you save a database as a different file name, you create a duplicate of that database. Any changes made to the original will not be reflected in the new copy.
- Access databases can be saved in many locations. We might choose to store them on our PC, in the cloud, or on a SharePoint site.
- Use the keyboard shortcut CTRL+N to create a new blank database.
- 00:04 In the last lesson,
- 00:05 we created a new database based off of the context template.
- 00:09 So if we jump back up to the File tab,
- 00:11 we can see it's sitting there at the top of the screen.
- 00:15 Now let's click to reopen that file.
- 00:18 Now remember, we're always going to get that welcome screen.
- 00:21 As I said, we are going to stop that from popping up in a moment.
- 00:24 For the time being,
- 00:25 let's just click the cross to close it because I want to rename this file.
- 00:28 Currently, this file is just called the rather generic Database4,
- 00:32 which is the name that Access has assigned to it.
- 00:35 Now, I want to make that a bit more meaningful.
- 00:38 So I'm going to resave the database by going up to File, down to Save As,
- 00:43 and then I can choose how I want to save it and where I want to save it.
- 00:48 And there are numerous different file types that you can save Access
- 00:52 databases as.
- 00:53 Now, we're just going to say this is a standard Access database,
- 00:56 which is the default up here.
- 00:58 So let's click on Save As,
- 01:00 you will get a little message pop up which basically tells you that all of
- 01:05 the all objects within the database must be closed prior to saving.
- 01:09 And if you haven't closed them, you can just click Yes here and
- 01:13 Access will close them for you.
- 01:15 Navigate to where you want to save this file.
- 01:19 And we're just going to call this Contacts01, and click on Save.
- 01:25 Now let's deal with this welcome screen.
- 01:28 There are a couple of different ways that you can stop this from popping up.
- 01:31 So if you notice right at the bottom, we have a little checkbox which says,
- 01:33 Show Welcome when the database is opened.
- 01:35 So the simplest way is simply to deselect this checkbox.
- 01:38 But let me show you an alternative way as well.
- 01:42 Let's click on the cross to close the welcome screen.
- 01:44 And when we have this Contact List open in a tab, if we right click and
- 01:48 go into Design View, and this is very important,
- 01:51 we're going to be switching between views all the time throughout this course.
- 01:57 If we go to Design View, and over on the left hand side where we have this pane,
- 02:01 which contains all the different parts of our database.
- 02:05 If we double click to open Settings, you can see in here as well,
- 02:09 we have a column called ShowWelcome, which has a checkmark in it.
- 02:15 So again, if you want to suppress that welcome screen,
- 02:18 you could just simply deselect it from here.
- 02:20 So whichever method you choose is absolutely fine.
- 02:23 Now we're going to close this database again.
- 02:26 So up to the File tab, and in the menu, we're going to select Close.
- 02:31 Now if we go back to File again and take a look at our recent list, now we have
- 02:36 Contacts01 at the top of the list, because it's the last one that we've accessed.
- 02:42 But we also do still have Database4 underneath.
- 02:46 So when you resave something, it doesn't overwrite the original,
- 02:50 it basically creates another copy, so just be aware of that.
- 02:54 Now the next thing we're going to do here is we're going to create a new blank
- 02:57 database.
- 02:58 So I could go up to the New area and select the Blank database template.
- 03:03 Alternatively, if I go back to the main Access window, I could press Ctrl+N,
- 03:07 which is going to jump me straight to that New area, and
- 03:11 I can double click to select Blank database.
- 03:14 Now the first thing I'm going to do here is save this file.
- 03:17 So File, Save As, we're going to save as the standard file type.
- 03:22 Let's close all of our objects, and now we can choose the folder to save into.
- 03:27 And I'm going to call this file, TechGurusTicketing.
- 03:34 Might give you a bit of an idea as to the type of database we're going to be
- 03:38 working on.
- 03:39 Let's click on Save.
- 03:40 I'm going to Enable Content again.
- 03:43 Now one thing you will notice is that in the title bar right at the top,
- 03:47 take a look at this big long title that we have.
- 03:50 It's basically showing me not just the file name,
- 03:53 it's showing me the entire path where I have this saved.
- 03:57 Now this looks really messy, I want something more concise.
- 04:01 So what you need to do is jump into File and
- 04:03 go all the way down to your Access options.
- 04:07 I told you we'd be jumping in and out of here all the time.
- 04:10 And now in the menu on the left, if we click on Current Database,
- 04:13 this is where we can define what we want that title to say.
- 04:16 So I just want this to say,
- 04:19 TechSalesTicketing, and click on OK.
- 04:24 And now immediately, I have a much neater title at the top.
- 04:28 So now we're pretty much at the stage where we can start to build our database.
- 04:32 And what you'll see in the next section is that databases
- 04:36 are fundamentally made up of a bunch of tables that we link together.
- 04:41 And then create things like queries to search through the database information,
- 04:46 and user friendly forms so that other people can interact with the information.
- 04:50 Now we don't want to get too far ahead of ourselves at this stage because we do
- 04:54 still have a couple of lessons to go through with regards to the Access
- 04:58 interface.
- 04:59 But one final point to mention in this lesson, and
- 05:02 that is when it comes to closing.
- 05:05 If we go up to the File tab and click Close,
- 05:08 that is simply going to close the database that we have open,
- 05:12 it's going to leave the actual application itself open.
- 05:16 Whereas if I click on the cross in the top right hand corner,
- 05:21 that is going to close down all of Access.
- 05:24 So be aware of that important distinction so you don't accidentally close
- 05:28 the entire thing when you only meant to close one database.
Lesson notes are only available for subscribers.