Do Not Display Empty Records

  • Thread starter Thread starter markmidwest
  • Start date Start date
M

markmidwest

I have a database with a user login field & then 1 field
for each document that they have COULD have access to. I
have 2 questions:
1) How do I get the query to return an error messgae if
an invalid user code is entered?

2) How do I get the query to not display fields for
documents users have no access to. It is not showing the
actual document, just the empty field.

Thanks for your help.

Mark
 
Hi,

1- Have an enforced relationship (foreign key)

2- Don't allow access to the table. Write a query picking the fields that
are allowed to be seen, and use the appropriate query you just created,
accordingly to the privileges of the front end user. You can probably change
the RecordSource property of the form and of the report in their Open event:

If test then
Me.RecordSource = "SELECT a As f1 , b As f2 , c As f3 FROM
myTable"
Else
Me.RecordSource = "SELECT a As f1 , b As f2, NULL As f3 FROM
myTable
End If


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top