Tip:
Highlight text to annotate it
X
I've made a copy of odb-08
add-delete-fields-and-tab-order and rename this
to odb-09-protect-a-field-
add-buttons down in our database window, we've got form selected
double-clicking on forms will show us that
we have the same form we left off with in the last video
I'm going to close this form and
open this up in Edit View right clicking edit
The first thing I wanna do is make
our text boxes a little smaller. So, I'm going to hold down Control
and select the employee ID text box. Now I'm going to add shift
and just click all the text boxes
all the way down. With all the selected
I'm going to open up Properties dialog box and we're going to change the height
to .25. Let's do the same thing with the zip code I need
all down control now I'm going to at shift
get the department and the group and we're going to make that height
point 25. Now I just want to
make these little closer together
little more adjusting here...
and we should be all set
All right, now I've got these lined up the way I want. I'm going to go into
design view
so we can see our data. One thing that we can do here
is edit any these fields and this first one
Has our autovalue; so, we don't want people to be able to update this field
Right now it is 0, we can change this one to 1. Going to the next
record and back
shows us, that it is updated to 1. We don't want people using the screen
to be able update employee ID.
I'm going to set this back to 0. Click on save and let's go back into
edit mode. So, we know that our employee ID text box, is one want to change
I'm going to hold down Control and select that text box
right clicking and clicking on control
will open up our dialog box and we see
one of our properties is read-only. Let's change that one
to yes. I want you deselect
the employee text box and go
in to design view. Now when I click in here
I cannot change this value
no matter what I type. That works pretty well
but I think we would rather have this where we cannot even
click inside that text box so I'm going back and edit mode
clicking on the employee ID text box
and we've got another property over here called
"enabled". It set to yes, let's change that
to No and going
into design view now
I cannot even select that text box
and will also noticed that the text is gray
instead a black, showing us that text box cannot be entered
Using our tabs we cannot tab into it. So, we've got our employee ID protected
The next thing I want to look at, is down here
where we have our next record in our previous record
and like to add some bigger buttons to this form. So, let's go into
edit mode and see what we can do. Looking in our form controls
we have one down here called more controls. Clicking that
brings up another tool bar with more controls.
This very bottom one here, is called
"Navigation bar" let me close this out and I'm going to select
our navigation bar and place it right
along here at the bottom. Going back into design view
we see that our navigation bar
is really similar to a navigation toolbar only we don't have that option
of finding a record. The rest all
looks pretty much the same. We can go to the next record
previous record in this really doesn't help
where I want my next record button to be bigger. These both have the
sort option right now we're sorting by employee ID
if I click on the sort we can change this to
last name, first name, put it last name
ascending, descending order and if you have
multiple people with the same last name you could then put first name underneath
so it will sort by last name
ascending order first name, we can make this descending order
clicking OK
shows us that they are now
in order by last name. Going back
into edit mode. Since
our navigation control is almost exactly like
our navigation toolbar but not quite as complete I'm going to you
removed that from. I'm going to
close the more controls and I am
going to add a push-button
clicking on it I'm going to add couple right down here at the bottom.
I'm going to click this first button here
and open up the dialog box
I want this first one to say
button, first-rec
and i wanted to have a label of "first"
now I'm going to hold down shift in hit enter to get a new line
"record". Now
I'm going to come down to the bottom where we see
"action". I'm going to click on the action drop down box
and select "first record". Let's do that with the next one
I want this one to be
btnPrev-Rec
this one to say - previous
shift enter record
and changing the action two previous record
clicking our button
3 - btn
next-Rec
we will make this next
shift enter record
and our last one. btn
last-Rec last
shift enter record
and we'll make that action last record
and you can see there's more options than just the four I'm selecting
so your couraged to try those out on your own. Let's close this
and see how it works going into design view
our previous record and first record are
inactive because we're at first record
when I click Next they become active first record
last record - and if I go to the next record we go into
input mode and we can see that I had something selected that's why we lost on
labels
turn that off clicking
off to deselect everything shows us that the labels are still there
back into edit mode
let's line up these buttons a little nicer I'm going to click on the first
one
hold down shift. I'm going to come over here
and right click select
alignment and I'm going to go to top so all the tops line-up
I want to bring up the Properties box in make these are the same size
let's give them all the same height I'll
.5 and were given the same with
point 75 to line them all up next to each other
I'm going to you click to deselect them all
and select that first record. We see this has got
a "position X" of 4.27
Let's make that four point 00. Selecting the next one
we're going to change that position
to 4.00 plus .75
So, it will be 4.75 because we made our widths
point 75. Now we have
4.75 plus point 75 we want this one to be
5.50 and the very last one
will be 6.25. Closing the
Properties dialog shows us our buttons maybe I'll align them
up to that bottom row here some going to select them all
and use my arrow keys to bring them down
running one more test to make sure it works going into design view
The first record, last record
next record. So, now we have our buttons working the way we want
I'm going to save this close the form
and save the database all
all cool all