Switching a Label on/off in a Report via a Form?

  • Thread starter dohernan via AccessMonster.com
  • Start date
D

dohernan via AccessMonster.com

I have a form, if a person puts a "y" in the Jean Field I want to store that
info until the person finishes filling out the form then clicks on a Command
Button to open a Report/Letter.
When that Report/Letter is opened, if there's a "y" in the Jean Field I want
the Jean Signature label to be visible. It has a default of another name
visible, with the Jean one defaulted to not visible.

The name of the Label-
JeanSignatureLabel

Thanks.


Thoughts so far, in the Form-
Private Sub Jean_AfterUpdate()

If Me.[Jean] = "y" Then
DoCmd.RunCommand acCmdSaveRecord, , _
"[AddressRecord] = " & Me.AddressRecord, , "J"

End If
End Sub


In the Report-
Private Sub Report_Open(Cancel As Integer)

If IsNull(Me.OpenArgs) Then
Me.JeanSignatureLabel.Visible = False
Else
Me.JeanSignatureLabel.Visible = True

End If
End Sub




I'm not quite sure how to pull this together, thanks. :)
 
P

Pendragon

Are you looking to make visible the label on the form or a label on the
report? It's unclear as you described it since you say the label is to be
visible after the user opens a report.

If you want the label on the form to be visible when the user clicks on the
command button to open the report, then put this in the OnClick property of
the command button.

Me.JeanSignatureLabel.visible = True

If you are talking about a label in the report being visible depending upon
the data from the form, I believe you can use the same statement above but
instead place it in the OnFormat property of the Detail section of the report.
 
D

dohernan via AccessMonster.com

Thanks.
I want the label to become visible on the Report.

People can do the Report without the Jean label, so I can't just tie that
command to the 'Create Report" button... unless it can check and see if they
picked 'y' on the Jean Field?

Are you looking to make visible the label on the form or a label on the
report? It's unclear as you described it since you say the label is to be
visible after the user opens a report.

If you want the label on the form to be visible when the user clicks on the
command button to open the report, then put this in the OnClick property of
the command button.

Me.JeanSignatureLabel.visible = True

If you are talking about a label in the report being visible depending upon
the data from the form, I believe you can use the same statement above but
instead place it in the OnFormat property of the Detail section of the report.
I have a form, if a person puts a "y" in the Jean Field I want to store that
info until the person finishes filling out the form then clicks on a Command
[quoted text clipped - 30 lines]
I'm not quite sure how to pull this together, thanks. :)
 

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