Access reports

B

bmbrman

I have an access program that was designed to track training. over the years
the requirements have changed. Now when I run the training report it does
not point to the right class Identifier. How to I modify the event or report
to show the correct class ID. I have over 200 classes that it tracks. I
only want to be able to see the most important ones and the dates it was
completed.
 
B

BruceM

What do you mean by "point to"? The short answer, I suppose, is that you
modify the Record Source so that it contains the necessary fields. As for
modifying an Event, which event, what is the Event's code now, and what do
you want instead?

How do you determine the most important classes? Is there a selection of
classes that are most important for everybody, or is the "most important"
list different for different attendees/students?

You can see your database, and you know the business situation. The rest of
us in this forum have neither of those advantages, so some more detail may
be needed.
 
W

Wayne-I-M

Hi

You need to give more details about your application
I only want to be able to see the
most important ones and the dates it was
completed.

How do you identify which classes you want to see
How are the classes that you at the moment identyfied.filtered
etc
etc
 
B

bmbrman

Currently when you click on the button it pulls a report for all individuals
that have a complition date under the specific auto assigned number for that
class. the problem that i have is that the auto assigned number it pulls
completion dates for is not the one that I need. I have tried to look at the
code for the event but it does not have any numerical indicators.

This is what the event code looks like

Private Sub ac1_Click()
On Error GoTo Err_ac1_Click

Dim stDOcname As String

stDOcname = "AC1"
DoCmd.OpenReport stDOcname, acPreview

Exit_ac1_Click:
Exit Sub

Err_ac1_Click:
MsgBox Err.Description
Resume Exit_ac1_Click

End Sub


Any ideas on what I need to do to change this event to a different auto
assigned number from the table?
 
B

BruceM

Your code is opening the report as it would if you opened it from the
database window. The report uses whatever is set as its Record Source.

One possibility is to base the report on a query, and specify the criteria.
For instance, say the form with the command button is named frmMain, and
ClassID is the field with the number you want for the report. Assuming
ClassID is a field in the report's Record Source query, in the Criteria row
for ClassID in the report's Record Source query:

=Forms!frmMain!ClassID
 
B

bmbrman

I figuired out where to modify the query that the report was pulling from.
It was just in the event set up for the form. simple now that i know what to
do. Thanks for taking the time to respond and try to help me out.
 

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

Top