Denying access to certain records in table

B

bali

Hello,

I've got a table that has records type X,Y,Z. Each record
has AutoIndex Number. I have a module which lets you select
type of records to update (asks user "Which type of records
do you want to update?) and then performs correct updating.
So let's say if I select type X, module should allow you
to enter the index number of records OF THAT TYPE ONLY but
I'm finding that if I select type X, I can still enter the
index numbers of the records of type Y and Z to update
those as well. Is there any way for me to deny access to
the Y and Z records if the user wants to update records of
type X? Thanks for any help in advance :D
 
R

Rick B

The query upon which your form is based should have a criteria in it to
limit the records displayed. under the Type field you would put something
like...

[Forms]![SomeFormName]![SelectTypeFieldName]

That assumes you are providing a combo box from which the type can be
selected.

Rick B



Hello,

I've got a table that has records type X,Y,Z. Each record
has AutoIndex Number. I have a module which lets you select
type of records to update (asks user "Which type of records
do you want to update?) and then performs correct updating.
So let's say if I select type X, module should allow you
to enter the index number of records OF THAT TYPE ONLY but
I'm finding that if I select type X, I can still enter the
index numbers of the records of type Y and Z to update
those as well. Is there any way for me to deny access to
the Y and Z records if the user wants to update records of
type X? Thanks for any help in advance :D
 
J

John Nurick

Hi Bali,

I can't work out from your description whether this updating is being
done automatically by VBA code in your module, or whether you're
displaying a form on which the user edits the record(s).

If I was doing something like this there'd almost certainly be an SQL
UPDATE or SELECT statement involved, either to do the update or to
select the records that may be updated, and I'd just include the record
type in its WHERE clause.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top