M
Maggs
have very simple form which was working last night in
office xp... on client machine running office 2003 I get
nothing but errors... let's start with
Private Sub Form_Load()
Me.Recordset.MoveFirst
' at this point ... NO CURRENT RECORD????
Me!cboRAC = Me.Recordset.[RAC]
Me!cboHospital = Me.Recordset.[Hospital]
End Sub
What am I missing between versions???
Here's another example: (please no comments on sloppy
coding or the multiple attempts at getting the code to
work...
Private Sub cboRAC_AfterUpdate()
On Error GoTo err_cboRAC_AfterUpdate
Dim strFind As String
Dim rst As Recordset
'Set rst = Me.RecordsetClone <-- never worked
Set rst = Me.Recordset
strFind = "[RAC] = """ & Me![cboRAC] & """"
'rst.FindFirst strFind <--- originally didn't work
'rst.FindFirst "[RAC] = " & Me![cboRAC]
rst.FindFirst strFind ' but worked last night?
If rst.NoMatch Then
GoTo diagnose
' MsgBox "Why not found? " & strFind
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
cboHospital = Me.RecordsetClone!Hospital
Me!cboHospital.RowSource = "select
qryRAC2B.hospital from qryRAC2B where qryRAC2B.RAC =
[forms]![frmRAC_Take2B]![cboRAC]"
Me!cboHospital.Requery
Me!cboHospital.SetFocus
End If
rst.Close
exit_cboRAC_Afterupdate:
Exit Sub
err_cboRAC_AfterUpdate:
MsgBox Err.Description
diagnose:
If rst.BOF Then
MsgBox "bof!"
If rst.EOF Then
' I ALWAYS END UP HERE ... but recordset NOT empty!
MsgBox "eof - we have a problem! *******"
End If
Else
If rst.EOF Then
MsgBox "eof"
End If
End If
End Sub
Can ANYONE shed any light on what's going on here????
PLEASE HELP.
Thanks!
office xp... on client machine running office 2003 I get
nothing but errors... let's start with
Private Sub Form_Load()
Me.Recordset.MoveFirst
' at this point ... NO CURRENT RECORD????
Me!cboRAC = Me.Recordset.[RAC]
Me!cboHospital = Me.Recordset.[Hospital]
End Sub
What am I missing between versions???
Here's another example: (please no comments on sloppy
coding or the multiple attempts at getting the code to
work...

Private Sub cboRAC_AfterUpdate()
On Error GoTo err_cboRAC_AfterUpdate
Dim strFind As String
Dim rst As Recordset
'Set rst = Me.RecordsetClone <-- never worked
Set rst = Me.Recordset
strFind = "[RAC] = """ & Me![cboRAC] & """"
'rst.FindFirst strFind <--- originally didn't work
'rst.FindFirst "[RAC] = " & Me![cboRAC]
rst.FindFirst strFind ' but worked last night?
If rst.NoMatch Then
GoTo diagnose
' MsgBox "Why not found? " & strFind
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
cboHospital = Me.RecordsetClone!Hospital
Me!cboHospital.RowSource = "select
qryRAC2B.hospital from qryRAC2B where qryRAC2B.RAC =
[forms]![frmRAC_Take2B]![cboRAC]"
Me!cboHospital.Requery
Me!cboHospital.SetFocus
End If
rst.Close
exit_cboRAC_Afterupdate:
Exit Sub
err_cboRAC_AfterUpdate:
MsgBox Err.Description
diagnose:
If rst.BOF Then
MsgBox "bof!"
If rst.EOF Then
' I ALWAYS END UP HERE ... but recordset NOT empty!
MsgBox "eof - we have a problem! *******"
End If
Else
If rst.EOF Then
MsgBox "eof"
End If
End If
End Sub
Can ANYONE shed any light on what's going on here????
PLEASE HELP.
Thanks!