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

AutoFilter in Excel with VB/SQL

Status
Not open for further replies.

HBelk

IS-IT--Management
Jul 10, 2003
5
US
I have a rather large spreadsheet with sensitive information per Employee. There are thousands of records.

Each line will have the Employee's SSN as an identifier in a SSN column. The HR Department wants to publish this one worksheet but only allow an employee to see his or her information.

I can go into the VB code and create a connection to our database to authenticate the user to their SSN, but I'm not sure how to use that information to automatically filter on the SSN column to display only their rows of information. I would also need to lock down the spreadsheet from having the filter taken off or the data manipulated.

Any help from any Excel/VB guru out there would be appreciated.

Thanks, HBelk
 
HBelk,

Have the Source Table as a workbook that the user will never open. Give the table a range name.

Using Data/Get External Data make a parameter query to that workbook/table with th ssn as a criteria.

VOLA!


Skip,
Skip@TheOfficeExperts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top