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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

allow acces to certain questions by user id on one form

Status
Not open for further replies.

Saturn87

IS-IT--Management
May 14, 2002
7
US
I have a Question form that is linked to and admin form in a answer table. The Adimistrator assigns questions for certain Employees to answer by user id. I don't want to allow all employees to access the form and to every question in the table just the ones with there user id. I have a password assigned to every employee and I created a password entry form, but I can't seem to get it to open the form by checking the two fields, only one, either user id or password. I was using stLinkCriteria, but don't know how to code it to check both fields. Even if the entry is wrong it is still opening the form but it's blank. Any Clue?
Thanks
 
Opening a form with more than one criteria can be tricky. Here is code I use in my application to do something like what you described.
Code:
stLinkCriteria = "[sys_PersonInformation_ID]=  " & Me![sys_PersonInformation_ID] & " AND [Password] = " & [Forms]![Startup_form]![Password_subform].[Form]![Password] & ""
If you're trying to do this using the wizard don't waste your time. It does't even give you the option of using multiple parameters. I hope this helps.
 
Why not use security, set them up as a group *the ones with the id* and based on that allow them access to your form? If not in the group cover the error non group users will receive with a sorry you don't have permission to access the form. Life's a journey enjoy the ride...

jazzz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top