Hello again and welcome back to our course on Access 2016.
In this third section on Datasheet View I’m going to look at actually entering and modifying
data in Datasheet View.
We’ve done a little bit of this already but I want to give you some useful tips and
information about finding your way round when you need to add or modify data and also how
to make this process easier, particularly in specific situations.
So I’m going to close the Navigation Pane.
I don’t need that at the moment.
And what we’re going to look at first is the column widths.
Now you’ve already seen how to adjust a column width.
So for instance if I wanted to increase or decrease the width of the Country column I
hover over the header, go to the right-hand edge till I get the double arrow and then
I can manually adjust the width.
However if I right click on the heading one of the options is Field Width.
And then I can either specify a column width in units, so for instance I could say here
I don’t want 19.25.
I want 16 and click on OK or there’s also a best fit option.
Let me select a couple of columns.
Let me select TripName, hold the Shift key down and select ActivityLevel, right click,
Field Width, click on Best Fit.
Now both of those columns widths have been adjusted to fit all of the data.
Now when you’re dealing with a long text field like the Description field Access 2016
won’t necessarily make the width of a column absolutely huge until it gets all of the text
in because that could make it a very wide field indeed.
But if I right click on that and go to Field Width and do Best Fit it does make it quite
a bit wider but it’s limited and it only goes so far in that width.
Now note there that once I’d made the Description field in particular much wider I now need
that scroll bar at the bottom to go from left to right through the fields in my table in
Datasheet View.
Now not only can you adjust the column widths you can adjust the row height as well.
And again you’ve got two basic options there.
If you select a row and then go to the lower edge over here on the left, note again the
double arrow, I can drag row height and it adjusts the height of all rows.
Note in this case that with a long text field like Description this has the advantage that
you’re sort of moving all of the text or a lot more of the text into View.
Now note that you can also set this to a fixed height using a little dialog.
So if I right click say on ID 4, go to row height.
If I wanted to say make it a specific height, say 50 units, click on OK.
All of the rows, all of the records in the table, the rows in Datasheet View adopt that
same height.
That can be a particularly useful thing for two reasons.
One as I’ve just pointed out where you’ve got a long text field it can help you to see
more of the long text at once.
And a second very useful reason is that if you’re using touch it can make it a lot
easier to be very accurate with touch with those taller rows because if you switch between
touch and mouse mode, let me just demonstrate this.
Although it spaces out the controls on the Ribbon, for example, it doesn’t make any
difference to the spacing and arrangement of the data in Datasheet View.
So let’s just go into touch mode now, look at the Ribbon and look at the data.
Although the Ribbon is spaced out more the data isn’t.
So I’m going to put that row height back somewhere near where it was before.
And a couple of other things that can be useful when you’re working on data.
If you have a table with many, many fields, say you’ve got many, many columns in Datasheet
View, there may be a situation where the work you’re going to do on maintaining data only
needs you to see a small number of columns.
And if say you wanted to update the activity levels and the maximum prices and they were
spread out, separated by a huge amount of space there are a couple of ways you can make
life a little bit easier for yourself.
One of them is that you can put the two columns together.
So let me take the PriceMaximum column, I’ve selected the column and if I click on the
header I can drag it over to be right next to the ActivityLevel.
And that makes it easy for me to work on those two columns together.
Now that doesn’t change the design.
If I go into Design View now it doesn’t change the sequence of those fields in the
design, but it does change them in Datasheet View.
And being able to move columns into new positions like that can make it much easier to work
on data.
Another thing that you can do is to at least temporarily hide a column.
So if for instance the Description column was getting in the way while you’re doing
some updates, if you right click on it one of the options is Hide Fields.
You could select more than one column of course and do Hide Fields.
And that column is now temporarily hidden.
If I subsequently want to unhide it, if I go to DurationDay and right click, Unhide
Fields.
It shows me a little dialog and I can see that any of the unchecked fields are hidden.
So if I want to show Description again I just check it there.
Obviously if I wanted to hide something I could uncheck it there.
So in that way you can hide and unhide fields, again, to make it easier to work on your data.
Let’s now look at some of the mechanics of entering and updating data.
The first thing I’m going to show you how to do is to delete a record.
Now the Louisiana Explorer we’ve used a few times already on the course for demonstration
and testing purposes.
It’s not a real trip so let’s delete it.
If I select it and then right click one of the options is Delete Record, but note also
that on the Home tab on the Ribbon in the Records group there is a Delete button and
you can use that.
Delete Record.
You’re asked for a confirmation, click Yes, and the Louisiana Explorer has gone.
Now note that deleting a record is something that you cannot undo.
So when you’ve deleted a record that’s it.
It’s gone.
Now notice at the moment that I have selected the ID field in the first record in the trip
table.
If I press the Tab key not only do I go through the fields in that record but as a I enter
each field the whole of the contents of the field are highlighted.
And if I start typing now I’ll immediately delete everything that’s in that field.
It may be that you want to overwrite everything that’s in the field but it may not be.
So you need to beware of the fact that as you tab through the fields in a record the
whole of each field will be selected as you enter it in Datasheet View.
Now if I’ve done this by accident and I type that X in and I say to myself, “Oh
no I’ve overtyped what it said in TripName.”
All you need to do is press the Escape key and you’ll be back to where you were.
And then if you want to actually make a specific correction what you really need to do is to
click within the field with the mouse or touch with your finger, get to the point that you
want to get to, and then just start deleting and typing text as normal.
So just be careful.
Let me press Tab again.
You notice how each time I have the whole field selected.
So one of the other useful things to be able to do is to find your way around the records
in a table.
And in the bottom left-hand corner there we have navigation buttons.
These are pretty standard types of navigation buttons.
Note that I currently have the first record in the table selected.
And the counter at the bottom says one of twelve.
So this is record one of twelve records in the table.
There is a right single arrow there which will take me through the records in the table.
I’m keeping this all full screen so that you can see me stepping through the records.
Obviously I can go backwards.
I can use the first one there, a sort of go back to the start if you’re using a DVD
player or an old VCR or something like that.
That takes me back to record one.
That takes me to the last record in the table.
And there’s another little button there which will take me to the place where I’ve
started creating a new record.
And just a couple of other quick points here.
Wherever you are in a table in Datasheet View if you do want to enter a new record you don’t
have to use the navigation buttons down there to take you to the end or scroll down.
The Records group on the Home tab includes a New.
That achieves the same thing.
And when you’re entering a new record you get to the point that you’ve entered all
of the field values that you need to.
In order to save the new record, so far we’ve been clicking elsewhere, normally on another
record in order to try to save the record that we’ve just been entering.
There is also in the Records group a Save button.
So when you’ve finish typing the values in the fields click on Save and it will save
the record, subject of course to what you’ve entered being valid.
Something else that can be very useful in Datasheet View is the ability to find particular
data and possibly even to replace particular data.
Let me demonstrate this with an example.
Let’s suppose that I know that generally speaking in descriptions when I use numbers
such as for instance here, View the big six or in some of these descriptions when I talk
about the number of days or nights.
It’s got eight nights and three star hotels and so on.
I know that in one or two situations I put a word instead of a number and I just want
to be consistent about this.
And somebody said to me, “Oh I saw one of your descriptions.
It’s got the word Seven in it, S-E-V-E-N, and it should be the number 7.”
Now if I’ve got hundreds of trips and I think, “Oh goodness.
Am I going to go through and try and find that?”
Now one way of dealing with this kind of thing, whatever kind of content it is, whatever field
it is in and so on is to use the controls in the Find group on the Home tab.
So let’s take this specific case as an example.
Let’s suppose that I know the word Seven is in use there somewhere and I want to replace
it with a numeric digit 7.
If I click on Replace it brings up the Find and Replace dialog.
And what I can say is well what I’m looking for, find what I’m looking for the word
Seven and I want to replace it with a 7.
Now look in the current field.
Well the current field is, well I’ve got the ID column selected.
Let’s say just the current document, so anywhere.
Match the whole field.
No, it’s not the whole field.
It’s just a word in a field.
So any part of a field.
Search all.
Do I need to match case?
No.
Let’s see if I can find a seven somewhere.
Oh look it’s found one there.
In the first record, ID 4, Wild for seven nights it said.
Well it should be a 7.
So let’s do a replace.
Now has it found another one?
No, there isn’t another one.
That’s the only case.
So of course if I knew this was in a specific field, so for instance if I wanted to change
the way a particular country’s name is spelt or described or something then I can use Find
and Replace in Datasheet View.
That is it for now on Datasheet View.
It’s time to start looking at relationships and getting one or two more tables into our
database.
We start that in the next section.
I’ll see you then.