A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Make subform visible or not in report?



 
 
Thread Tools Display Modes
  #21  
Old July 20th, 2007, 06:38 PM posted to microsoft.public.access.reports
Klatuu
external usenet poster
 
Posts: 7,074
Default Make subform visible or not in report?

Not a problem, we will just change the height of th subreport to 0.

If Forms!MyFormName!MyCheckBoxName = True Then
Me.MySubReportControlName.Visible = True
Else
Me.MySubReportControlName.Visible = False
Me.MySubReportControlName.Height = 0
End If


--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Your not going to believe this. It works perfectly however the report shows
either a blank page or 1/2 of a blank page where the comments use to be. The
comments subform is in the middle of the main form and the company will not
let me move it to the end. What next? My last step!

Thanks again

"Klatuu" wrote:

This is really the easiest way there is. It shouldn't take but a few minutes
to do it.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

They have someone coming in next week. Yea! however this one is a thorn in my
side. You would not believe it if I told you. What a mess. I just thought
someone could inform me of an easier way?

"TKM" wrote:

I am tired as heck as I have 11 tickts I am trying to clear up. Dont mean to
sound so dumb about this but here is how it goes. The user selects the report
he wants from a cbo. the report then opens and the user will print the report
in front of her directly using the menu. Now all want is some way for the
user to have an option to print or not print the comeent section on the
report. Your past answers will they take care of this? I am very tired 12
hours and pushing it. Thanks for all your help!

"Klatuu" wrote:

You don't need a Y/N field in your table. You just need a checkbox on the
form. That way when a user checks the checkbox, the comments will show.

Step two:
Slap the crap out of your lazy developer.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Thanks however it is a little more complicated than that. The form has a
subform also. There is no Y/N field and the developers wont add one to the
table. There is a print form button on the main form that does a ton of stuff
that I could add in the code but need the Y/N to make it work? Maybe add
another button or?

"Klatuu" wrote:

You can use the Open event of the report to read the value in a control on
the form from which you launch the report and make the sub report control on
the report visible or not. This example uses a check box where checking the
box makes the comments visible.

Me.subComments.Visible = Forms!FormName!chkShowComments
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I messed up. I need to make the comment either print or not print. As I
stated it is embedded as a subform in the report based off its own query. Any
help would be appreciated.

"TKM" wrote:

I have a subform in my report list all the comments associated with a loan
number. I am looking for a why (in my query?) to hve the Comments print or
not print depending what the user wants. I dont not have a Y/N box set up for
this. Is there a way in my query I can do this?

  #22  
Old July 20th, 2007, 07:54 PM posted to microsoft.public.access.reports
TKM
external usenet poster
 
Posts: 289
Default Make subform visible or not in report?

The repor tor the subReport does not have a Height properties? I thought it
did but no can do!

"Klatuu" wrote:

Not a problem, we will just change the height of th subreport to 0.

If Forms!MyFormName!MyCheckBoxName = True Then
Me.MySubReportControlName.Visible = True
Else
Me.MySubReportControlName.Visible = False
Me.MySubReportControlName.Height = 0
End If


--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Your not going to believe this. It works perfectly however the report shows
either a blank page or 1/2 of a blank page where the comments use to be. The
comments subform is in the middle of the main form and the company will not
let me move it to the end. What next? My last step!

Thanks again

"Klatuu" wrote:

This is really the easiest way there is. It shouldn't take but a few minutes
to do it.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

They have someone coming in next week. Yea! however this one is a thorn in my
side. You would not believe it if I told you. What a mess. I just thought
someone could inform me of an easier way?

"TKM" wrote:

I am tired as heck as I have 11 tickts I am trying to clear up. Dont mean to
sound so dumb about this but here is how it goes. The user selects the report
he wants from a cbo. the report then opens and the user will print the report
in front of her directly using the menu. Now all want is some way for the
user to have an option to print or not print the comeent section on the
report. Your past answers will they take care of this? I am very tired 12
hours and pushing it. Thanks for all your help!

"Klatuu" wrote:

You don't need a Y/N field in your table. You just need a checkbox on the
form. That way when a user checks the checkbox, the comments will show.

Step two:
Slap the crap out of your lazy developer.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Thanks however it is a little more complicated than that. The form has a
subform also. There is no Y/N field and the developers wont add one to the
table. There is a print form button on the main form that does a ton of stuff
that I could add in the code but need the Y/N to make it work? Maybe add
another button or?

"Klatuu" wrote:

You can use the Open event of the report to read the value in a control on
the form from which you launch the report and make the sub report control on
the report visible or not. This example uses a check box where checking the
box makes the comments visible.

Me.subComments.Visible = Forms!FormName!chkShowComments
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I messed up. I need to make the comment either print or not print. As I
stated it is embedded as a subform in the report based off its own query. Any
help would be appreciated.

"TKM" wrote:

I have a subform in my report list all the comments associated with a loan
number. I am looking for a why (in my query?) to hve the Comments print or
not print depending what the user wants. I dont not have a Y/N box set up for
this. Is there a way in my query I can do this?

  #23  
Old July 20th, 2007, 07:58 PM posted to microsoft.public.access.reports
Klatuu
external usenet poster
 
Posts: 7,074
Default Make subform visible or not in report?

Yes it does. You are looking in the wrong place. A subreport is actually a
control on the report and the actual report being used in the subreport
control is the Source Object of the subreport control. In design view, open
the properties dialog, and select the subreport control. You will see the
height property there.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

The repor tor the subReport does not have a Height properties? I thought it
did but no can do!

"Klatuu" wrote:

Not a problem, we will just change the height of th subreport to 0.

If Forms!MyFormName!MyCheckBoxName = True Then
Me.MySubReportControlName.Visible = True
Else
Me.MySubReportControlName.Visible = False
Me.MySubReportControlName.Height = 0
End If


--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Your not going to believe this. It works perfectly however the report shows
either a blank page or 1/2 of a blank page where the comments use to be. The
comments subform is in the middle of the main form and the company will not
let me move it to the end. What next? My last step!

Thanks again

"Klatuu" wrote:

This is really the easiest way there is. It shouldn't take but a few minutes
to do it.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

They have someone coming in next week. Yea! however this one is a thorn in my
side. You would not believe it if I told you. What a mess. I just thought
someone could inform me of an easier way?

"TKM" wrote:

I am tired as heck as I have 11 tickts I am trying to clear up. Dont mean to
sound so dumb about this but here is how it goes. The user selects the report
he wants from a cbo. the report then opens and the user will print the report
in front of her directly using the menu. Now all want is some way for the
user to have an option to print or not print the comeent section on the
report. Your past answers will they take care of this? I am very tired 12
hours and pushing it. Thanks for all your help!

"Klatuu" wrote:

You don't need a Y/N field in your table. You just need a checkbox on the
form. That way when a user checks the checkbox, the comments will show.

Step two:
Slap the crap out of your lazy developer.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Thanks however it is a little more complicated than that. The form has a
subform also. There is no Y/N field and the developers wont add one to the
table. There is a print form button on the main form that does a ton of stuff
that I could add in the code but need the Y/N to make it work? Maybe add
another button or?

"Klatuu" wrote:

You can use the Open event of the report to read the value in a control on
the form from which you launch the report and make the sub report control on
the report visible or not. This example uses a check box where checking the
box makes the comments visible.

Me.subComments.Visible = Forms!FormName!chkShowComments
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I messed up. I need to make the comment either print or not print. As I
stated it is embedded as a subform in the report based off its own query. Any
help would be appreciated.

"TKM" wrote:

I have a subform in my report list all the comments associated with a loan
number. I am looking for a why (in my query?) to hve the Comments print or
not print depending what the user wants. I dont not have a Y/N box set up for
this. Is there a way in my query I can do this?

  #24  
Old July 20th, 2007, 08:14 PM posted to microsoft.public.access.reports
TKM
external usenet poster
 
Posts: 289
Default Make subform visible or not in report?

I know you are right but I have been looking for 30 minutes. I looked in the
properties of the main report, the subreport and the actual control in the
subreport which is comment. Comment is the only field that I can find that
has a Height in the preperties field. I went over each one of the above
property by property. What the heck am I missing?

"Klatuu" wrote:

Yes it does. You are looking in the wrong place. A subreport is actually a
control on the report and the actual report being used in the subreport
control is the Source Object of the subreport control. In design view, open
the properties dialog, and select the subreport control. You will see the
height property there.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

The repor tor the subReport does not have a Height properties? I thought it
did but no can do!

"Klatuu" wrote:

Not a problem, we will just change the height of th subreport to 0.

If Forms!MyFormName!MyCheckBoxName = True Then
Me.MySubReportControlName.Visible = True
Else
Me.MySubReportControlName.Visible = False
Me.MySubReportControlName.Height = 0
End If


--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Your not going to believe this. It works perfectly however the report shows
either a blank page or 1/2 of a blank page where the comments use to be. The
comments subform is in the middle of the main form and the company will not
let me move it to the end. What next? My last step!

Thanks again

"Klatuu" wrote:

This is really the easiest way there is. It shouldn't take but a few minutes
to do it.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

They have someone coming in next week. Yea! however this one is a thorn in my
side. You would not believe it if I told you. What a mess. I just thought
someone could inform me of an easier way?

"TKM" wrote:

I am tired as heck as I have 11 tickts I am trying to clear up. Dont mean to
sound so dumb about this but here is how it goes. The user selects the report
he wants from a cbo. the report then opens and the user will print the report
in front of her directly using the menu. Now all want is some way for the
user to have an option to print or not print the comeent section on the
report. Your past answers will they take care of this? I am very tired 12
hours and pushing it. Thanks for all your help!

"Klatuu" wrote:

You don't need a Y/N field in your table. You just need a checkbox on the
form. That way when a user checks the checkbox, the comments will show.

Step two:
Slap the crap out of your lazy developer.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Thanks however it is a little more complicated than that. The form has a
subform also. There is no Y/N field and the developers wont add one to the
table. There is a print form button on the main form that does a ton of stuff
that I could add in the code but need the Y/N to make it work? Maybe add
another button or?

"Klatuu" wrote:

You can use the Open event of the report to read the value in a control on
the form from which you launch the report and make the sub report control on
the report visible or not. This example uses a check box where checking the
box makes the comments visible.

Me.subComments.Visible = Forms!FormName!chkShowComments
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I messed up. I need to make the comment either print or not print. As I
stated it is embedded as a subform in the report based off its own query. Any
help would be appreciated.

"TKM" wrote:

I have a subform in my report list all the comments associated with a loan
number. I am looking for a why (in my query?) to hve the Comments print or
not print depending what the user wants. I dont not have a Y/N box set up for
this. Is there a way in my query I can do this?

  #25  
Old July 20th, 2007, 08:22 PM posted to microsoft.public.access.reports
TKM
external usenet poster
 
Posts: 289
Default Make subform visible or not in report?

I have it on the ON open of my main report. This should work?
If Forms!frmMain!Comment = True Then

Me.[rsubJoseReport-InProcessComments].Visible = True

Else

Me.[rsubJoseReport-InProcessComments].Visible = False

Me.[rsubJoseReport-InProcessComments].Height = 0

End If



End Sub

"Klatuu" wrote:

Yes it does. You are looking in the wrong place. A subreport is actually a
control on the report and the actual report being used in the subreport
control is the Source Object of the subreport control. In design view, open
the properties dialog, and select the subreport control. You will see the
height property there.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

The repor tor the subReport does not have a Height properties? I thought it
did but no can do!

"Klatuu" wrote:

Not a problem, we will just change the height of th subreport to 0.

If Forms!MyFormName!MyCheckBoxName = True Then
Me.MySubReportControlName.Visible = True
Else
Me.MySubReportControlName.Visible = False
Me.MySubReportControlName.Height = 0
End If


--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Your not going to believe this. It works perfectly however the report shows
either a blank page or 1/2 of a blank page where the comments use to be. The
comments subform is in the middle of the main form and the company will not
let me move it to the end. What next? My last step!

Thanks again

"Klatuu" wrote:

This is really the easiest way there is. It shouldn't take but a few minutes
to do it.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

They have someone coming in next week. Yea! however this one is a thorn in my
side. You would not believe it if I told you. What a mess. I just thought
someone could inform me of an easier way?

"TKM" wrote:

I am tired as heck as I have 11 tickts I am trying to clear up. Dont mean to
sound so dumb about this but here is how it goes. The user selects the report
he wants from a cbo. the report then opens and the user will print the report
in front of her directly using the menu. Now all want is some way for the
user to have an option to print or not print the comeent section on the
report. Your past answers will they take care of this? I am very tired 12
hours and pushing it. Thanks for all your help!

"Klatuu" wrote:

You don't need a Y/N field in your table. You just need a checkbox on the
form. That way when a user checks the checkbox, the comments will show.

Step two:
Slap the crap out of your lazy developer.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Thanks however it is a little more complicated than that. The form has a
subform also. There is no Y/N field and the developers wont add one to the
table. There is a print form button on the main form that does a ton of stuff
that I could add in the code but need the Y/N to make it work? Maybe add
another button or?

"Klatuu" wrote:

You can use the Open event of the report to read the value in a control on
the form from which you launch the report and make the sub report control on
the report visible or not. This example uses a check box where checking the
box makes the comments visible.

Me.subComments.Visible = Forms!FormName!chkShowComments
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I messed up. I need to make the comment either print or not print. As I
stated it is embedded as a subform in the report based off its own query. Any
help would be appreciated.

"TKM" wrote:

I have a subform in my report list all the comments associated with a loan
number. I am looking for a why (in my query?) to hve the Comments print or
not print depending what the user wants. I dont not have a Y/N box set up for
this. Is there a way in my query I can do this?

  #26  
Old July 20th, 2007, 09:04 PM posted to microsoft.public.access.reports
Klatuu
external usenet poster
 
Posts: 7,074
Default Make subform visible or not in report?

It should work, let me know.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I have it on the ON open of my main report. This should work?
If Forms!frmMain!Comment = True Then

Me.[rsubJoseReport-InProcessComments].Visible = True

Else

Me.[rsubJoseReport-InProcessComments].Visible = False

Me.[rsubJoseReport-InProcessComments].Height = 0

End If



End Sub

"Klatuu" wrote:

Yes it does. You are looking in the wrong place. A subreport is actually a
control on the report and the actual report being used in the subreport
control is the Source Object of the subreport control. In design view, open
the properties dialog, and select the subreport control. You will see the
height property there.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

The repor tor the subReport does not have a Height properties? I thought it
did but no can do!

"Klatuu" wrote:

Not a problem, we will just change the height of th subreport to 0.

If Forms!MyFormName!MyCheckBoxName = True Then
Me.MySubReportControlName.Visible = True
Else
Me.MySubReportControlName.Visible = False
Me.MySubReportControlName.Height = 0
End If


--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Your not going to believe this. It works perfectly however the report shows
either a blank page or 1/2 of a blank page where the comments use to be. The
comments subform is in the middle of the main form and the company will not
let me move it to the end. What next? My last step!

Thanks again

"Klatuu" wrote:

This is really the easiest way there is. It shouldn't take but a few minutes
to do it.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

They have someone coming in next week. Yea! however this one is a thorn in my
side. You would not believe it if I told you. What a mess. I just thought
someone could inform me of an easier way?

"TKM" wrote:

I am tired as heck as I have 11 tickts I am trying to clear up. Dont mean to
sound so dumb about this but here is how it goes. The user selects the report
he wants from a cbo. the report then opens and the user will print the report
in front of her directly using the menu. Now all want is some way for the
user to have an option to print or not print the comeent section on the
report. Your past answers will they take care of this? I am very tired 12
hours and pushing it. Thanks for all your help!

"Klatuu" wrote:

You don't need a Y/N field in your table. You just need a checkbox on the
form. That way when a user checks the checkbox, the comments will show.

Step two:
Slap the crap out of your lazy developer.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Thanks however it is a little more complicated than that. The form has a
subform also. There is no Y/N field and the developers wont add one to the
table. There is a print form button on the main form that does a ton of stuff
that I could add in the code but need the Y/N to make it work? Maybe add
another button or?

"Klatuu" wrote:

You can use the Open event of the report to read the value in a control on
the form from which you launch the report and make the sub report control on
the report visible or not. This example uses a check box where checking the
box makes the comments visible.

Me.subComments.Visible = Forms!FormName!chkShowComments
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I messed up. I need to make the comment either print or not print. As I
stated it is embedded as a subform in the report based off its own query. Any
help would be appreciated.

"TKM" wrote:

I have a subform in my report list all the comments associated with a loan
number. I am looking for a why (in my query?) to hve the Comments print or
not print depending what the user wants. I dont not have a Y/N box set up for
this. Is there a way in my query I can do this?

  #27  
Old July 20th, 2007, 09:58 PM posted to microsoft.public.access.reports
TKM
external usenet poster
 
Posts: 289
Default Make subform visible or not in report?

No it does not work. This dang thing. I also found the same subform within
another subform in the main form. Why does the first code you gave me work
(the one that started this entire deal) but this one wont work? Its pretty
much the same thing. Same subform etc?

"Klatuu" wrote:

It should work, let me know.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I have it on the ON open of my main report. This should work?
If Forms!frmMain!Comment = True Then

Me.[rsubJoseReport-InProcessComments].Visible = True

Else

Me.[rsubJoseReport-InProcessComments].Visible = False

Me.[rsubJoseReport-InProcessComments].Height = 0

End If



End Sub

"Klatuu" wrote:

Yes it does. You are looking in the wrong place. A subreport is actually a
control on the report and the actual report being used in the subreport
control is the Source Object of the subreport control. In design view, open
the properties dialog, and select the subreport control. You will see the
height property there.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

The repor tor the subReport does not have a Height properties? I thought it
did but no can do!

"Klatuu" wrote:

Not a problem, we will just change the height of th subreport to 0.

If Forms!MyFormName!MyCheckBoxName = True Then
Me.MySubReportControlName.Visible = True
Else
Me.MySubReportControlName.Visible = False
Me.MySubReportControlName.Height = 0
End If


--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Your not going to believe this. It works perfectly however the report shows
either a blank page or 1/2 of a blank page where the comments use to be. The
comments subform is in the middle of the main form and the company will not
let me move it to the end. What next? My last step!

Thanks again

"Klatuu" wrote:

This is really the easiest way there is. It shouldn't take but a few minutes
to do it.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

They have someone coming in next week. Yea! however this one is a thorn in my
side. You would not believe it if I told you. What a mess. I just thought
someone could inform me of an easier way?

"TKM" wrote:

I am tired as heck as I have 11 tickts I am trying to clear up. Dont mean to
sound so dumb about this but here is how it goes. The user selects the report
he wants from a cbo. the report then opens and the user will print the report
in front of her directly using the menu. Now all want is some way for the
user to have an option to print or not print the comeent section on the
report. Your past answers will they take care of this? I am very tired 12
hours and pushing it. Thanks for all your help!

"Klatuu" wrote:

You don't need a Y/N field in your table. You just need a checkbox on the
form. That way when a user checks the checkbox, the comments will show.

Step two:
Slap the crap out of your lazy developer.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Thanks however it is a little more complicated than that. The form has a
subform also. There is no Y/N field and the developers wont add one to the
table. There is a print form button on the main form that does a ton of stuff
that I could add in the code but need the Y/N to make it work? Maybe add
another button or?

"Klatuu" wrote:

You can use the Open event of the report to read the value in a control on
the form from which you launch the report and make the sub report control on
the report visible or not. This example uses a check box where checking the
box makes the comments visible.

Me.subComments.Visible = Forms!FormName!chkShowComments
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I messed up. I need to make the comment either print or not print. As I
stated it is embedded as a subform in the report based off its own query. Any
help would be appreciated.

"TKM" wrote:

I have a subform in my report list all the comments associated with a loan
number. I am looking for a why (in my query?) to hve the Comments print or
not print depending what the user wants. I dont not have a Y/N box set up for
this. Is there a way in my query I can do this?

  #28  
Old July 20th, 2007, 10:02 PM posted to microsoft.public.access.reports
Klatuu
external usenet poster
 
Posts: 7,074
Default Make subform visible or not in report?

If the first one works, all you need to do is put the height property setting
in it.
I know this works when done correctly.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

No it does not work. This dang thing. I also found the same subform within
another subform in the main form. Why does the first code you gave me work
(the one that started this entire deal) but this one wont work? Its pretty
much the same thing. Same subform etc?

"Klatuu" wrote:

It should work, let me know.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I have it on the ON open of my main report. This should work?
If Forms!frmMain!Comment = True Then

Me.[rsubJoseReport-InProcessComments].Visible = True

Else

Me.[rsubJoseReport-InProcessComments].Visible = False

Me.[rsubJoseReport-InProcessComments].Height = 0

End If



End Sub

"Klatuu" wrote:

Yes it does. You are looking in the wrong place. A subreport is actually a
control on the report and the actual report being used in the subreport
control is the Source Object of the subreport control. In design view, open
the properties dialog, and select the subreport control. You will see the
height property there.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

The repor tor the subReport does not have a Height properties? I thought it
did but no can do!

"Klatuu" wrote:

Not a problem, we will just change the height of th subreport to 0.

If Forms!MyFormName!MyCheckBoxName = True Then
Me.MySubReportControlName.Visible = True
Else
Me.MySubReportControlName.Visible = False
Me.MySubReportControlName.Height = 0
End If


--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Your not going to believe this. It works perfectly however the report shows
either a blank page or 1/2 of a blank page where the comments use to be. The
comments subform is in the middle of the main form and the company will not
let me move it to the end. What next? My last step!

Thanks again

"Klatuu" wrote:

This is really the easiest way there is. It shouldn't take but a few minutes
to do it.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

They have someone coming in next week. Yea! however this one is a thorn in my
side. You would not believe it if I told you. What a mess. I just thought
someone could inform me of an easier way?

"TKM" wrote:

I am tired as heck as I have 11 tickts I am trying to clear up. Dont mean to
sound so dumb about this but here is how it goes. The user selects the report
he wants from a cbo. the report then opens and the user will print the report
in front of her directly using the menu. Now all want is some way for the
user to have an option to print or not print the comeent section on the
report. Your past answers will they take care of this? I am very tired 12
hours and pushing it. Thanks for all your help!

"Klatuu" wrote:

You don't need a Y/N field in your table. You just need a checkbox on the
form. That way when a user checks the checkbox, the comments will show.

Step two:
Slap the crap out of your lazy developer.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Thanks however it is a little more complicated than that. The form has a
subform also. There is no Y/N field and the developers wont add one to the
table. There is a print form button on the main form that does a ton of stuff
that I could add in the code but need the Y/N to make it work? Maybe add
another button or?

"Klatuu" wrote:

You can use the Open event of the report to read the value in a control on
the form from which you launch the report and make the sub report control on
the report visible or not. This example uses a check box where checking the
box makes the comments visible.

Me.subComments.Visible = Forms!FormName!chkShowComments
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I messed up. I need to make the comment either print or not print. As I
stated it is embedded as a subform in the report based off its own query. Any
help would be appreciated.

"TKM" wrote:

I have a subform in my report list all the comments associated with a loan
number. I am looking for a why (in my query?) to hve the Comments print or
not print depending what the user wants. I dont not have a Y/N box set up for
this. Is there a way in my query I can do this?

  #29  
Old July 20th, 2007, 10:14 PM posted to microsoft.public.access.reports
TKM
external usenet poster
 
Posts: 289
Default Make subform visible or not in report?

Yes I did that also. I will take abreak for a while and try again. Thanks for
all your help!

"Klatuu" wrote:

If the first one works, all you need to do is put the height property setting
in it.
I know this works when done correctly.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

No it does not work. This dang thing. I also found the same subform within
another subform in the main form. Why does the first code you gave me work
(the one that started this entire deal) but this one wont work? Its pretty
much the same thing. Same subform etc?

"Klatuu" wrote:

It should work, let me know.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I have it on the ON open of my main report. This should work?
If Forms!frmMain!Comment = True Then

Me.[rsubJoseReport-InProcessComments].Visible = True

Else

Me.[rsubJoseReport-InProcessComments].Visible = False

Me.[rsubJoseReport-InProcessComments].Height = 0

End If



End Sub

"Klatuu" wrote:

Yes it does. You are looking in the wrong place. A subreport is actually a
control on the report and the actual report being used in the subreport
control is the Source Object of the subreport control. In design view, open
the properties dialog, and select the subreport control. You will see the
height property there.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

The repor tor the subReport does not have a Height properties? I thought it
did but no can do!

"Klatuu" wrote:

Not a problem, we will just change the height of th subreport to 0.

If Forms!MyFormName!MyCheckBoxName = True Then
Me.MySubReportControlName.Visible = True
Else
Me.MySubReportControlName.Visible = False
Me.MySubReportControlName.Height = 0
End If


--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Your not going to believe this. It works perfectly however the report shows
either a blank page or 1/2 of a blank page where the comments use to be. The
comments subform is in the middle of the main form and the company will not
let me move it to the end. What next? My last step!

Thanks again

"Klatuu" wrote:

This is really the easiest way there is. It shouldn't take but a few minutes
to do it.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

They have someone coming in next week. Yea! however this one is a thorn in my
side. You would not believe it if I told you. What a mess. I just thought
someone could inform me of an easier way?

"TKM" wrote:

I am tired as heck as I have 11 tickts I am trying to clear up. Dont mean to
sound so dumb about this but here is how it goes. The user selects the report
he wants from a cbo. the report then opens and the user will print the report
in front of her directly using the menu. Now all want is some way for the
user to have an option to print or not print the comeent section on the
report. Your past answers will they take care of this? I am very tired 12
hours and pushing it. Thanks for all your help!

"Klatuu" wrote:

You don't need a Y/N field in your table. You just need a checkbox on the
form. That way when a user checks the checkbox, the comments will show.

Step two:
Slap the crap out of your lazy developer.
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

Thanks however it is a little more complicated than that. The form has a
subform also. There is no Y/N field and the developers wont add one to the
table. There is a print form button on the main form that does a ton of stuff
that I could add in the code but need the Y/N to make it work? Maybe add
another button or?

"Klatuu" wrote:

You can use the Open event of the report to read the value in a control on
the form from which you launch the report and make the sub report control on
the report visible or not. This example uses a check box where checking the
box makes the comments visible.

Me.subComments.Visible = Forms!FormName!chkShowComments
--
Dave Hargis, Microsoft Access MVP


"TKM" wrote:

I messed up. I need to make the comment either print or not print. As I
stated it is embedded as a subform in the report based off its own query. Any
help would be appreciated.

"TKM" wrote:

I have a subform in my report list all the comments associated with a loan
number. I am looking for a why (in my query?) to hve the Comments print or
not print depending what the user wants. I dont not have a Y/N box set up for
this. Is there a way in my query I can do this?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.