Protecting data in simple query (1 Viewer)

mrrayj60

Registered User.
Local time
Today, 13:01
Joined
Sep 3, 2009
Messages
103
I dont want my users to accidently change data (name, addr, etc) in this query, only allow them to register a vote yes or no. I cannot find any lock or enable in the query properties. Thanks for your help, Ray :confused:

SELECT residents.num, residents.recordid, residents.name, residents.addr201, residents.[55plus yes], residents.[55plus no]
FROM residents
WHERE (((residents.num)>"6" And (residents.num)<"7") AND ((residents.residentstatus) Like '*po*') AND ((residents.Vote)="1"))
ORDER BY residents.num;
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 04:01
Joined
Jan 20, 2009
Messages
12,849
The users should not be seeing a query but interacting via a form where you can manage their rights.
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 04:01
Joined
Jan 20, 2009
Messages
12,849
You also have several anomalies.

Fields 55plusYes and 55plusNo. This is a breach of normalization.

Numbers treated as strings. Comparisons such as < used on strings will result in unexpected errors. With strings, 7 is greater than 11.

Resident status would be better handled as a number with a lookup to for the displayed text.

Name is a reserved would and should be changed or at the very least surrounded by square brackets.
 

Users who are viewing this thread

Top Bottom