Drop down lists

G

Guest

Drop down lists are driving me nuts.

I set up a table for all the officers’ names and ID as the primary key. So
I set up a form with an unbound text box so when I open the form I am able to
click on the drop down arrow and I can see the list off all the officers. So
I put a Command Button to open a report so it will show the officer I picked
from the drop down list but it won’t work. Do I have to make a marco? If
so, how do I do that? Thanks for the help.
 
J

Jeff Boyce

Kelly

Forms and reports are two different objects. If you want a report to only
have the record you are viewing in a form, you have to tell Access to only
use that record.

One way to do this is to add:
DoCmd.OpenReport
to the command button, AND use the syntax for filtering or the WHERE clause,
pointing to the ID of the record displayed in the form.

Check Access HELP for the exact syntax on that command.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
B

Brian

The other less flexible option would be to Change the Record Source
for your report to be based on the criteria that you specify in the
form (drop down box). Is the report based on a query, or just on a
table?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top