Conditional Display

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am making a database with a list of all of my employees. I have a report
that prints out all of their phone numbers. I just want the report to only
print out active employees. I have a Yes/No object in the table named
"Active". The form I have setup understands it but I'm not sure how to make
the report understand it too.
 
To the print report command line you can add a criteria

Dim MyWhere As String
MyWhere = "[Yes/No Active FieldName] = True"
Docmd.OpenReport "ReportName", , , MyWhere
 
I'm pretty new to Access. Where would I find that?

Ofer said:
To the print report command line you can add a criteria

Dim MyWhere As String
MyWhere = "[Yes/No Active FieldName] = True"
Docmd.OpenReport "ReportName", , , MyWhere

--
\\// Live Long and Prosper \\//
BS"D


cdavis82 said:
I am making a database with a list of all of my employees. I have a report
that prints out all of their phone numbers. I just want the report to only
print out active employees. I have a Yes/No object in the table named
"Active". The form I have setup understands it but I'm not sure how to make
the report understand it too.
 
I'm still not sure how to make this work. Any ideas?

cdavis82 said:
I'm pretty new to Access. Where would I find that?

Ofer said:
To the print report command line you can add a criteria

Dim MyWhere As String
MyWhere = "[Yes/No Active FieldName] = True"
Docmd.OpenReport "ReportName", , , MyWhere

--
\\// Live Long and Prosper \\//
BS"D


cdavis82 said:
I am making a database with a list of all of my employees. I have a report
that prints out all of their phone numbers. I just want the report to only
print out active employees. I have a Yes/No object in the table named
"Active". The form I have setup understands it but I'm not sure how to make
the report understand it too.
 
I'm sorry it took me a while to come back to you, create a button on the form
where you got the active employee, and on the button OnClick event add this
code

Check this link, it might make things more clear

http://www.databasedev.co.uk/report_from_form_record.html

--
\\// Live Long and Prosper \\//
BS"D


cdavis82 said:
I'm still not sure how to make this work. Any ideas?

cdavis82 said:
I'm pretty new to Access. Where would I find that?

Ofer said:
To the print report command line you can add a criteria

Dim MyWhere As String
MyWhere = "[Yes/No Active FieldName] = True"
Docmd.OpenReport "ReportName", , , MyWhere

--
\\// Live Long and Prosper \\//
BS"D


:

I am making a database with a list of all of my employees. I have a report
that prints out all of their phone numbers. I just want the report to only
print out active employees. I have a Yes/No object in the table named
"Active". The form I have setup understands it but I'm not sure how to make
the report understand it too.
 

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


Back
Top