Form filtering crash

Peter_AccessHelp

New member
Local time
Tomorrow, 08:43
Joined
Aug 1, 2007
Messages
2
Hi,

Having a problem with a client .ade which has been running okay for around 12 months - Access is now fairly consistently crashing with an unexpected error.

Cannot duplicate this on my machine - we both have Access 2003, although the client also has the runtime installed. I tracked the issue down, on the clients machine, to the form filter.

Currently the form Record Source is set to a table. The form filter is set to:
fk_LogState = 1

The form has an option group which sets one of 3 states: 1 through 3. As soon as I select number 3 the crash occurs:

Me.lstViewableShifts.RowSourceType = "Table/View/StoredProc"

FormStatus = Me.optStatus.Value
'MsgBox "Option Status: " & FormStatus & ". About to set filter."

Select Case FormStatus
Case 1:
Forms![frmLogHeader].Filter = "fk_LogState = 1"
Case 2
Forms![frmLogHeader].Filter = "fk_LogState = 2"
Case 3
Forms![frmLogHeader].Filter = "fk_LogState = 3"
End Select

Forms![frmLogHeader].FilterOn = True ' Bang! Thanks for coming - crashes on this line.

'set recordsource of list box using current option for status
Me.lstViewableShifts.RowSource = "EXEC spLogHeaderRecordsetAdmin @Status = " & Me.optStatus
Me.lstViewableShifts.Requery


It remains in the original state of 1.

Any help would be greatly appreciated.

Regards,
PG
 
Last edited:
Hi,

Well, no body had Access 2033 yet.

Try Me.OptStatus.OptionValue instead of "Value"

Hi,
Having a problem with a client .ade which has been running okay for around 12 months - Access is now fairly consistently crashing with an unexpected error.
Cannot duplicate this on my machine - we boith have Access 2033, although the client also has the runtime installed. I tracked the issue down, on the clients machine, to the form filter.
Currently the form Record Source is set to a table. The form filter is set to:
fk_LogState = 1
The form has an option group which sets one of 3 states: 1 through 3. As soon as I select number 3 the crash occurs:
Me.lstViewableShifts.RowSourceType = "Table/View/StoredProc"
FormStatus = Me.optStatus.Value
'MsgBox "Option Status: " & FormStatus & ". About to set filter."

Select Case FormStatus
Case 1:
Forms![frmLogHeader].Filter = "fk_LogState = 1"
Case 2
Forms![frmLogHeader].Filter = "fk_LogState = 2"
Case 3
Forms![frmLogHeader].Filter = "fk_LogState = 3"
End Select

Forms![frmLogHeader].FilterOn = True ' Bang! Thanks for coming - crashes on this line.

'set recordsource of list box using current option for status
Me.lstViewableShifts.RowSource = "EXEC spLogHeaderRecordsetAdmin @Status = " & Me.optStatus
Me.lstViewableShifts.Requery
It remains in the original state of 1.
Any help would be greatly appreciated.
Regards,
PG
 
Trying Me.OptStatus.OptionValue instead of Me.OptStatus.Value results in:
"Compile error: Method or data member not found."

Anyone have similar issues or any thoughts on how to resolve this?
 
Hi Peter,

What is the option group name? Is it "FormStatus"?

What's the optStatus control for?

How is the part of the code activated from?

Select Case FormStatus
Case 1: >>>>> is this a typo?
Forms![frmLogHeader].Filter = "fk_LogState = 1"
Case 2
Forms![frmLogHeader].Filter = "fk_LogState = 2"
Case 3
Forms![frmLogHeader].Filter = "fk_LogState = 3"
End Select

Need further input on this as above questions.

Forms![frmLogHeader].FilterOn = True ' Bang! Thanks for coming - crashes on this line.
 

Users who are viewing this thread

Back
Top Bottom