Limit Table to a single record

ianhornby

New member
Local time
Today, 09:24
Joined
Mar 15, 2005
Messages
7
Does anyone know how to limit a table to a single record?

I have a back-end/multiple front end database. In the front ends are several queries in which the parameters are dependent on a "user number". So my query has conditions like ID being >([UserT]![Field1]*300) And <([UserT]![Field1]*300+101)

The UserT table holds the "user number" so that the above formula determines the low end and high end limits of the records in the query. If Filed 1 above was set to zero I'd get records 0 through 100, is set to one it would give records 300 to 400 and so on.

I have no idea what would happen if there were multiple entries in the UserT table.

Thanks
 
I am a bit puzzled by what you are looking for here. Why not just use a constant if you are looking for a single value? Also Access records are not stored in any particular order. Also how do yo find records 101 to 299 in your example in the OP.
 
What I do to force a one record table is create a field with a numeric/long datatype, then in the validation rule enter =1, THEN make that field a unique index, plus I set the default value to 1, and then set the field to Required.
 
I am a bit puzzled by what you are looking for here. Why not just use a constant if you are looking for a single value? Also Access records are not stored in any particular order. Also how do yo find records 101 to 299 in your example in the OP.

Hi, thanks for the response.

I am working with a group of fairly unskilled computer users and want them to be able to change a "parameter" in the simplest way possible to determine which set of records their queries find.

I have 3 queries in each front end, each of which should find 100 records, so if the "parameter" is set to 0, they get records 0-100, 100-200 and 200-300. Setting it to 1 gets records 400-500, 500-600 and 600-700 in the three queries. And so on. Allowing them to insert 0, 1, 2 etc into a single record table seemed the simplest answer and allows me to forbid them from design access to queries.

If there's a better way, I'd love it.
 
Why not use an option group on a form?

Forgive me, but I'm not exactly sure what you mean. I should have made clear that I don't want the users themselves to be able to alter what recordset they get - the front end is altered by their manager, who has no more skill than they do, so I don't want anything to appear on the users' screens.

Fussy, ain't I? :D
 
if you have a constants lookup table, that you only need one record for then

in the form that maintains this you

a) keep the user on the current record
b) dont let him be able to add or delete records

the user should not be able to open the table directly
 
Thanks for your ideas - I think I now have a workbable solution.

Have a great weekend.
 

Users who are viewing this thread

Back
Top Bottom