reports

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

Guest

Hi, I have a Main database with names of my customers. Then I have created a
separate table for encounters. I managed to create a form that combines main
table data and have a subform of encounters. I would like to be able to click
on sertain encounter and create a report for one encounter at a time. Please
help me
 
for encounters, I'm assuming you have a unique identifier for the encounter
(like Encounter_Id), if so, create a button in your subform, using the wizard
make the event open the report for the specific encounter, the resulting code
will look something like this:

sub btnOpenReport_Click
dim stCriteria as string
dim stDocName as string

stDocName = "YourReportName"
stCriteria = "[Encounter_Id]=" & me.Encounter_Id & ""

docmd.openreport stDocName, acViewPreview, stCriteria

end sub

If you are using datasheet view for your subform you can copy this code to
the Encounter on Double click event,
 
Back
Top