From: kary via AccessMonster.com on 23 Apr 2010 01:44 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/Forums.aspx/access-gettingstarted/201004/1
From: Jeff Boyce on 23 Apr 2010 05:01 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(a)uwe> wrote in message news:a6f2245ba3734(a)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/Forums.aspx/access-gettingstarted/201004/1 >
From: kary via AccessMonster.com on 23 Apr 2010 05:55 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
From: kary via AccessMonster.com on 23 Apr 2010 08:10 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/Forums.aspx/access-gettingstarted/201004/1
|
Pages: 1 Prev: Display data in the form using the tables Next: Linking forms field and table field . |