Filtering Records with Command Buttons

  • Thread starter Thread starter Joe T
  • Start date Start date
J

Joe T

I have a patient database with MS Access project as front
end, and SQL Server 2000 as back end to hold tables etc.
I have a "Patient Information" Form that I want to add a
command button to.

I want a command button to filter through another
form "Patient Exams" so that only those exams pop up.

I run the command button wizard and try to filter the
records by the "Patient ID #" field.

When I run the command, the result is that all Patient
exams show up. The command button won't filter the
records. I have the Primary key as the "Patient ID #"
filed in the Patient Information table, and "Patient ID #"
as the foreign key in the "Patient Exams" table.
Before I upgraded from Access mdb, the command buttons
worked fine! If I compare the code used, they look
exactly the same! Does SQL Server 2000 not let you filter
records this way?
The only way I can filter the records now is by using a
parameter query, and actually typing in the "Patient ID #"
as the cirteria to be filtered. (I want to eliminate this
step!)
Please help me!!!
Thanks,
Dr Joe T.
 
Can you copy, paste, and post (just the pertinent
snippets) of code that do and don't work? Have you
searched the Knowledge Base at
http://support.microsof.com? What version of Access are
you using to create your ADP? Have you applied all Service
Packs and updates to both Access and to the SQL Server
that you are using? Even with the details, I may not be
able to help, but without some, it seems unlikely that
anyone will be able to do so.

Larry Linson
Microsoft Access MVP
 
I assume you have a ADP not MDB.
Unless you have 10,000+ recorders, you can do a Right click on the field on
the form and select Filter for.
you can put in a value for that field and it will show only the records that
match.

now if you change the form to design mode then you can expand the form to
the right. You will see a grey area Right click and select properties and
the All tab.
you will see the filter statement. this will give you an Idea how to code
the filters you want.
 
Back
Top