![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm using an Access 2002 application in Access 2010 (as part of testing before upgrading). The behaviour described below doesn't happen when the same app is opened in Access 2002. I have a form called fMain from which I open another form using: DoCmd.OpenForm "fElectSwitch", , , "PropNum = " & gblPropNum The OnOpen event of fElectSwitch includes the line: DoCmd.ApplyFilter, "ElectID = " & vElectID When the form opens, I get an 'Enter Parameter Value ..ElectID" message. I click OK (entering no value), and the form opens. When I then close the form, fMain is a grey screen. It appears that the filter has been applied to the form from which the OpenForm call was made. If I insert a new line in fElectSwitch OnOpen to set the focus to a control on the form, there is no problem. Whilst I can work around the problem, it appears to indicate that something is wrong. Anyone else experienced the problem? Bob Darlington Brisbane |
#3
| |||
| |||
|
|
On 13/02/2011 23:41:42, "Bob Darlington" wrote: I'm using an Access 2002 application in Access 2010 (as part of testing before upgrading). The behaviour described below doesn't happen when the same app is opened in Access 2002. I have a form called fMain from which I open another form using: DoCmd.OpenForm "fElectSwitch", , , "PropNum = " & gblPropNum The OnOpen event of fElectSwitch includes the line: DoCmd.ApplyFilter, "ElectID = " & vElectID When the form opens, I get an 'Enter Parameter Value ..ElectID" message. I click OK (entering no value), and the form opens. When I then close the form, fMain is a grey screen. It appears that the filter has been applied to the form from which the OpenForm call was made. If I insert a new line in fElectSwitch OnOpen to set the focus to a control on the form, there is no problem. Whilst I can work around the problem, it appears to indicate that something is wrong. Anyone else experienced the problem? Bob Darlington Brisbane Doesn't surprise me. You have 2 forms open, which one is the DoCmd.ApplyFilter command going to apply to? My guess would be the form that has the focus i.e. fMain. Phil |
![]() |
| Thread Tools | |
| Display Modes | |
| |