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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

open report



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2010, 06:44 AM posted to microsoft.public.access.gettingstarted
kary via AccessMonster.com
external usenet poster
 
Posts: 8
Default open report

Hi

Is it possible to make a label visible during the OpenReport command? I have
the following commands:

If option 1 is selected --
DoCmd.OpenReport stDocName, acPreview, , "M1Ass1Comment='Fail M1Ass1'"
If option 2 is selected -
DoCmd.OpenReport stDocName, acPreview, , "M1Ass2Comment='Fail M1Ass2'" ,
etc

However, I would like a different label on the report to be visible depending
on the selection. Is On Load the only way to achieve that?
Thank you
Kary

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/201004/1

  #2  
Old April 23rd, 2010, 10:01 AM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default open report

Where are you (?proposing to be?) selecting this option?

If you use a form to "collect" your criteria, then open a report, the report
could "look" back at the form to set values.

You could even have a single label and change the "Caption" property's value
to whatever fit...

Good luck

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"kary via AccessMonster.com" u57638@uwe wrote in message
news:a6f2245ba3734@uwe...
Hi

Is it possible to make a label visible during the OpenReport command? I
have
the following commands:

If option 1 is selected --
DoCmd.OpenReport stDocName, acPreview, , "M1Ass1Comment='Fail M1Ass1'"
If option 2 is selected -
DoCmd.OpenReport stDocName, acPreview, , "M1Ass2Comment='Fail M1Ass2'" ,
etc

However, I would like a different label on the report to be visible
depending
on the selection. Is On Load the only way to achieve that?
Thank you
Kary

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/201004/1



  #3  
Old April 23rd, 2010, 10:55 AM posted to microsoft.public.access.gettingstarted
kary via AccessMonster.com
external usenet poster
 
Posts: 8
Default open report

1. I have a form with command buttons to select the item required eg Module
1, Module 2, etc.

2. My query calculates the Final mark for each Module of a course. In
addition it has a field for each Module with an IIF statement which marks the
students who fail by putting the text "Fail Modx". (Is there a better way to
do this as my sql command which shows in Sql View is long and cumbersome; I
know I don't really need to look at it but ..)

3. Then I need to print labels for all students who have failed. I would
like to have just 1 report printing these labels depending on which Module is
requested in step 1. The report prints fine with the OpenReport command
using a where condition. .
However, the Module they have failed may be in one of 6 fields of the query
so all 6 fields need to be added to the report which fills up the report
label and makes it messy.

SO, I'd like the control/field for "Fail Modx" to be invisible and then when
the selection is made in Step 1, for that modules control/field to become
visible.
Hope this makes sense!
Regards
Kary



Jeff Boyce wrote:
Where are you (?proposing to be?) selecting this option?

If you use a form to "collect" your criteria, then open a report, the report
could "look" back at the form to set values.

You could even have a single label and change the "Caption" property's value
to whatever fit...

Good luck

Hi

[quoted text clipped - 13 lines]
Thank you
Kary


--
Message posted via http://www.accessmonster.com

  #4  
Old April 23rd, 2010, 01:10 PM posted to microsoft.public.access.gettingstarted
kary via AccessMonster.com
external usenet poster
 
Posts: 8
Default open report

Hi again
I have solved this problem! I declare a temporary variable (TempVars
("stLabel").Value = "M1A1 Fail") when selecting the Module in step 1 and then
use it as control source for a control on the label.
Many thanks for your help - your original comment about changing the
"captions value" made me start thinking!
Many thanks
Kary

kary wrote:
1. I have a form with command buttons to select the item required eg Module
1, Module 2, etc.

2. My query calculates the Final mark for each Module of a course. In
addition it has a field for each Module with an IIF statement which marks the
students who fail by putting the text "Fail Modx". (Is there a better way to
do this as my sql command which shows in Sql View is long and cumbersome; I
know I don't really need to look at it but ..)

3. Then I need to print labels for all students who have failed. I would
like to have just 1 report printing these labels depending on which Module is
requested in step 1. The report prints fine with the OpenReport command
using a where condition. .
However, the Module they have failed may be in one of 6 fields of the query
so all 6 fields need to be added to the report which fills up the report
label and makes it messy.

SO, I'd like the control/field for "Fail Modx" to be invisible and then when
the selection is made in Step 1, for that modules control/field to become
visible.
Hope this makes sense!
Regards
Kary

Where are you (?proposing to be?) selecting this option?

[quoted text clipped - 11 lines]
Thank you
Kary


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/201004/1

 




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 02:31 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.