Connecting Tech Pros Worldwide Forums | Help | Site Map

Need help locking fields. MS Access 2000

moischmoe
Guest
 
Posts: n/a
#1: Nov 13 '05
I am using MS Access 2000. I have a database that I use to keep weekly
attendance records. In my table, each record consists of the fields:
name, week 1, week 2, week 3, ect...(each week I add a new week field).
I use a yes/no button to place a checkmark under each week to indicate
whether a person was present (checked), or absent (no check). Here's my
question: Can I lock the previous weekly fields to prevent
accidentally checking or unchecking the box? For example can I lock
weeks 1&2, but leave week 3 unlocked for editing?

Thanks,
moischmoe


MGFoster
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Need help locking fields. MS Access 2000


moischmoe wrote:[color=blue]
> I am using MS Access 2000. I have a database that I use to keep weekly
> attendance records. In my table, each record consists of the fields:
> name, week 1, week 2, week 3, ect...(each week I add a new week field).
> I use a yes/no button to place a checkmark under each week to indicate
> whether a person was present (checked), or absent (no check). Here's my
> question: Can I lock the previous weekly fields to prevent
> accidentally checking or unchecking the box? For example can I lock
> weeks 1&2, but leave week 3 unlocked for editing?[/color]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Your table design is incorrect (not normalized). Try this design:

CREATE TABLE Attendance (
[name] varchar(25) not null ,
[year] integer not null,
[week] byte not null ,
[attended] boolean not null default 0,
CONSTRAINT PK_Attendance PRIMARY KEY ([name], [year], [week])
)

Data looks like this:

name year week attended
------------- ---- ---- --------
Fred Jones 2005 1 0
Fred Jones 2005 2 -1
Shirly Jones 2005 1 -1
Shirly Jones 2005 2 -1
....

You'd add a new row (record) for each week's attendance per student.
The attended column can be formatted to show a check box - just use
Yes/No in the Format property of the table.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQm6z44echKqOuFEgEQJe7gCg8rNY7Oq6bmPHWon/LLWlAaJGOmwAoJ9K
8SOvVvGM/18V5ymSzmuAvt0i
=TT1h
-----END PGP SIGNATURE-----
Closed Thread


Similar Microsoft Access / VBA bytes