Reporting from a Filtered Form

S

Sylvie

Well, it worked report on page 1, on Pages 2 and 3 didn't work. I'm getting
the error: "Compile error: Method or data member not found". I am wondering
if I need other code for the other reports. SO for a better understanding I
have a form VISIT and a 3 pages with subforms linked by visitid. Any help?
TIA

Sylvie said:
I GOT IT!!! I used the VisitID PK in another table as FK, so on the query I
was using both Visit ID. So when I deleted the Visit ID as FK it WORKED!!!!
YEAHHH!! Thanks

Sylvie said:
Another infor : on my report Filter I have:
= Forms![Visit]![Dipstick Subform].form![SubjectID])
So when I enter data on the subform for that person, I need to print report
right the way, instea I received a "run-time error"3075'. Where I am missing
information?

Sylvie said:
HI Duane
I've been searching for a answer for my problem and I used the following
code, however is not filtering. Any ideas?
Private Sub PrintDipstick_Click()
Dim StrWhere As String
If Me.Dirty Then
Me.Dirty = False 'Save any edits
Else

StrWhere = "[VisitID]" & Me.VisitID
DoCmd.OpenReport "ReportDipstick", acViewPreview, , StrWhere
End If
End Sub

TIA

:

Hi

I have a filtered form. I have added a command to preview a report and in
the event procedure (from Click) of this command I have added

Private Sub cmd_Preview_Click()
Dim strWhere As String
If Me.Dirty Then Me.Dirty = False 'save any edits
If Me.FilterOn Then strWhere = Me.Filter
DoCmd.OpenReport "AGI Status", acViewPreview, , strWhere
End Sub

The form and report are related to the same query.

The trouble is, when the report opens it contains all records, not the
filtered ones.

Can someone tell me where I have gone wrong and how to fix it please?

Thanks in advance.

Kitty
 

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