eamonskelly
Programmer
I have connected a report to VB via OLEDB to a SQL Server 2000 database. I have created a table which contains the necessary values, which is populated with the userId of the individual who has entered the fields. At the moment my report brings back all fields independant of this userID, how can I get it to filter by a certain userID passed from VB code. I have created the connection to the database at design time, but included the following line to stop the 'server not yet been opened error':
Report.Database.Tables(1).SetLogOnInfo "ServerName", "DatabaseName", "UserName", "Password"
Is there a way to do a select based upon the userID, passed from VB and place this in the report. I can do it via unbound fields, but this doesn't allow me to add groups.
Report.Database.Tables(1).SetLogOnInfo "ServerName", "DatabaseName", "UserName", "Password"
Is there a way to do a select based upon the userID, passed from VB and place this in the report. I can do it via unbound fields, but this doesn't allow me to add groups.