Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read only problem

Status
Not open for further replies.

MarkWaddington

Programmer
Aug 19, 2002
64
0
0
GB
I have a switchboard item called "enter new client" which when clicked, goes to a new client record. When a user logs in who is read only he/she is bombarded with error messages if he/she clicks that switchboard item. Is there any way to suppress these errors?

Thanks in advance.
 
Are calling a form from the switchboard? If so, please explain the form clearly
 
The user is presented with errors because when the form opens it automatically goes to a new record. Read only users cannot do this.

I want some kind of statement that does this:

If (ReadOnly) Then

DoCmd.Close

Can anyone help?

Thanks
 
You must check if user can add new record, and de/activate the possibilities to add new record.

See the thread: Copy the functions of the last (actually last...) post into a module.

Then in your form OnOpen event, use something like:

Me.AllowAdditions = GetPermission(CurrentUser(), poTables, "MyTable") And dbSecInsertData
 
i recommend the streamlined approach.

If the user has the lower secuirty level, disable the enter new record control on the switchboard. I can provide you examples offline if you wish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top