Data Access Page based on a Query

  • Thread starter Thread starter valntyn via AccessMonster.com
  • Start date Start date
V

valntyn via AccessMonster.com

Info:
I have a data access page that i created in Access 2002, it is based on a SQL
query also created in Access 2002.

Here is the code SQL code:

SELECT [Employee - PC Info].[Last Name], [Employee - PC Info].[First Name],
[Employee - PC Info].[Phone Number], [Employee - PC Info].[Cost Center],
[Employee - PC Info].Location, [Employee - PC Info].[PC Node Name], [Employee
- PC Info].[ODOT Inventory #], [Software Info].Software, [Software Info].
[Location Stored], [Software Info].[License Key]
FROM [Employee - PC Info] INNER JOIN ([Software Info] INNER JOIN [PC to
Software] ON [Software Info].Software = [PC to Software].Software) ON
[Employee - PC Info].[PC Node Name] = [PC to Software].[PC Node Name]
WHERE ((([Software Info].Software)=[Forms]![Software Info]![Search]))
ORDER BY [Software Info].Software;

Problem:
Basically, I want the employee's info based on a specific software program
installed on there PC. The software name is entered on Software Info form in
the Search field. When I manually run the query after entering the software
info it returns the correct records, works great.

The problem is, when I enter the software info on the form and click on the
link to open the page, it displays all records. It doesn't filter by the
software name entered on the form.

I hope this makes sense. Any help would be greatly appreciated.
 
DAPs cannot read forms, so the query cannot see the filtering value from the
form.

You must use other methods for filtering DAPs -- put the parameter in a
cookie and have the DAP read the cookie and filter the DAP's recordset is
one way.

See http://www.cadellsoftware.org/SampleDBs.htm#FilterDAP for a sample
database that shows how to use a cookie in this way.
 
Back
Top