title: VBA code when refering a SubReport from a Main Report in Access
body: <p>I am  setting an instruction (VBA) in  <strong>On Load Event</strong>   on a  report in MS Access.
  When I open the report,the code works perfect.
  But when i try to embeded the report as a subreport on a main report, the code doesnt work.
  I think  the problem is that I should be referering the field different(Me.Service1...), since I am trying to call the field now  from a main report, but i havent found the right syntaxis. 
  This is the code i wanna embeed on my main report:</p>
  
  <pre><code>Private Sub Report_Load()
  
  
  If Me.Service1 = "Scanmachine" Then
  Me.Vessel.Visible = True
  Me.Label400.Visible = True
  Else
  Me.Vessel.Visible = False
  Me.Label400.Visible = False
  End If
  
  
  End Sub
  </code></pre>
  
  <p>Any suggestions? </p>