![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Just a Heads-up: I have upgraded several DBs to A2010 over the last year without any real problem. However, the latest one I've upgraded has thrown up two changes that have derailed my DB. a) the syntax I have been using for referring to a control on a page of a tabcontrol appears no longer to work: [Forms]![frmClient]![TabCtl3].[Pages]![Letters etc].[Controls]! [lstLetterLog].Requery fails. It needs now to be [Forms]![frmClient]![lstLetterLog].Requery. The original code has worked correctly for years ... the new version is a lot simpler and I prefer it. Don't know if it would always have worked - I must have got the old syntax from Help, I suppose. |
|
b) I have (for many years) been in the habit of opening several related Reports (in Preview mode) one after another by using the OnClose event of one Report to open the next. The subsequent report opens OK but will not close by any means I can find (other than brute force 3 finger salute or Alt F4 which shuts down Access). My solution has been to open Reports in Dialogue mode and place the code to open the next Report after the DoCmd.OpenReport stuff for the first Report in the same code module. This has the side effect that there is no Ribbon (or Toolbar) showing so you have to Print via Ctrl- P or right-click and select Print. Also, you must Maximize the Report in the OnOpen event cos DoCmd.Maximize will not fire in the code module until the Dialogue report is closed. Again this is better, I think. You can more easily see the set of Reports that are going to open and the screen display is much cleaner. So an improvement I feel but time consuming to put right. |
#3
| |||
| |||
|
|
jbguernsey wrote: Just a Heads-up: I have upgraded several DBs to A2010 over the last year without any real problem. *However, the latest one I've upgraded has thrown up two changes that have derailed my DB. a) *the syntax I have been using for referring to a control on a page of a tabcontrol appears no longer to work: [Forms]![frmClient]![TabCtl3].[Pages]![Letters etc].[Controls]! [lstLetterLog].Requery fails. It needs now to be [Forms]![frmClient]![lstLetterLog].Requery. The original code has worked correctly for years ... the new version is a lot simpler and I prefer it. *Don't know if it would always have worked - I must have got the old syntax from Help, I suppose. If lstLetterLog os a subform, your old syntax has been technically incorrect all along. *Old versions of Access let it slip through, but A2002 or A2003 were more rigorous and required te use of the Form property: * *Forms!frmClient!TabCtl3.Pages![Letters etc].Controls!lstLetterLog.Form.Requery and the same applies to the cleaner syntax: * *Forms!frmClient!lstLetterLog.Form.Requery b) I have (for many years) been in the habit of opening several related Reports (in Preview mode) one after another by using the OnClose event of one Report to open the next. *The subsequent report opens OK but will not close by any means I can find (other than brute force 3 finger salute or Alt F4 which shuts down Access). My solution has been to open Reports in Dialogue mode and place the code to open the next Report after the DoCmd.OpenReport stuff for the first Report in the same code module. *This has the side effect that there is no Ribbon (or Toolbar) showing so you have to Print via Ctrl- P or right-click and select Print. *Also, you must Maximize the Report in the OnOpen event cos DoCmd.Maximize will not fire in the code module until the Dialogue report is closed. *Again this is better, I think. *You can more easily see the set of Reports that are going to open and the screen display is much cleaner. So an improvement I feel but time consuming to put right. Sheesh, but I hope you were doing something wrong. *I hate to think that something that simple could block a report from closing. Personally, I fon't like opening reports in dialog mode. *I prefer to open all the reports at once, not sequentially. *I provide a toolbar with a button for each report for users to select the one on top so I never tried what you were doing. Even so, I can't imagine how it go so far off the rails. -- Marsh |
#4
| |||
| |||
|
|
On Feb 1, 6:48*pm, Marshall Barton <marshbar... (AT) wowway (DOT) com> wrote: jbguernsey wrote: Just a Heads-up: I have upgraded several DBs to A2010 over the last year without any real problem. *However, the latest one I've upgraded has thrown up two changes that have derailed my DB. a) *the syntax I have been using for referring to a control on a page of a tabcontrol appears no longer to work: [Forms]![frmClient]![TabCtl3].[Pages]![Letters etc].[Controls]! [lstLetterLog].Requery fails. It needs now to be [Forms]![frmClient]![lstLetterLog].Requery. The original code has worked correctly for years ... the new version is a lot simpler and I prefer it. *Don't know if it would always have worked - I must have got the old syntax from Help, I suppose. If lstLetterLog os a subform, your old syntax has been technically incorrect all along. *Old versions of Access let it slip through, but A2002 or A2003 were more rigorous and required te use of the Form property: * *Forms!frmClient!TabCtl3.Pages![Letters etc].Controls!lstLetterLog.Form.Requery and the same applies to the cleaner syntax: * *Forms!frmClient!lstLetterLog.Form.Requery b) I have (for many years) been in the habit of opening several related Reports (in Preview mode) one after another by using the OnClose event of one Report to open the next. *The subsequent report opens OK but will not close by any means I can find (other than brute force 3 finger salute or Alt F4 which shuts down Access). My solution has been to open Reports in Dialogue mode and place the code to open the next Report after the DoCmd.OpenReport stuff for the first Report in the same code module. *This has the side effect that there is no Ribbon (or Toolbar) showing so you have to Print via Ctrl- P or right-click and select Print. *Also, you must Maximize the Report in the OnOpen event cos DoCmd.Maximize will not fire in the code module until the Dialogue report is closed. *Again this is better, I think. *You can more easily see the set of Reports that are going to open and the screen display is much cleaner. So an improvement I feel but time consuming to put right. Sheesh, but I hope you were doing something wrong. *I hate to think that something that simple could block a report from closing. Personally, I fon't like opening reports in dialog mode. *I prefer to open all the reports at once, not sequentially. *I provide a toolbar with a button for each report for users to select the one on top so I never tried what you were doing. Even so, I can't imagine how it go so far off the rails. No, it wasn't on a subform (I don't think). I'd also like to think I'm doing something dumb with the Reports - although the 'new' method is nice it's a lot of work to get them all! |
![]() |
| Thread Tools | |
| Display Modes | |
| |