Hi
Access2002/2007 .mdb
WinXpPro SP3
I know this is a popular question because I've read quite a lot on it but each time I think I've cracked it yet another failure comes along.
I run the following tests in the Current Event of a Main Form (in this case after a filter has been applied) to make sure there is a valid record in both main and subforms......Forms are DAO based.
The above now fails at the last line with "Object Invalid or No Longer Set"... short of testing the outside air temperature, last year's total rainfall on the Spanish Plain and if there is an 'R' in the month what else do I need to make this reliable please??
Thanks
Access2002/2007 .mdb
WinXpPro SP3
I know this is a popular question because I've read quite a lot on it but each time I think I've cracked it yet another failure comes along.
I run the following tests in the Current Event of a Main Form (in this case after a filter has been applied) to make sure there is a valid record in both main and subforms......Forms are DAO based.
Code:
With mySubform
If Not Me.Form.Recordset Is Nothing Then
If Not Me.Form.Recordset.EOF Then
If Me.Form.Recordset.RecordCount > 0 Then
If Not IsNull(Me.Form.Recordset![ID]) Then
If Not .Form.Recordset Is Nothing Then
If Not .Form.Recordset.EOF Then
If .Form.Recordset.RecordCount > 0 Then
If Not IsNull(.Form.Recordset![ID]) Then
If Me.Form.Recordset![ID] <> .Form.Recordset![ID] Then
The above now fails at the last line with "Object Invalid or No Longer Set"... short of testing the outside air temperature, last year's total rainfall on the Spanish Plain and if there is an 'R' in the month what else do I need to make this reliable please??
Thanks