Really Really Urgent Help Needed

Geoff Codd

Registered User.
Local time
Today, 22:08
Joined
Mar 6, 2002
Messages
190
I've got until 2pm to get this done

I have the following code

Me.OrderNumber = Me.CurrentRecord
Me.OfOrderNumber = me.RecordsetClone.RecordCount

Which should show the record count for a subform, the problem is that it always shows order 1 of 1, until I move to the next order using a custom navigation button then it will show order 2 of 2 and when I then move back to the first order it will show order 1 of 2

Any help will be greatly appreciated
Thanks
Geoff
 
Sub Form_Current()
On Error GoTo Form_Current_Err

Me.txtCurrRec = Form.CurrentRecord
Me.txtTotalRecs = Form.RecordsetClone.RecordCount + IIf(Form.NewRecord, 1, 0) & " " & "(filtered)"
 
rich,

i put the code in and i still get the wrong count but now i get 1 of 1 (filtered), until i move to the next record and i get i of 2 and when i go back to the previous record i get 1 of 2

any other ideas you have would be greatfully received

thanks
geoff
 
Do you not need to move to the last record before doing a count as you do with recordsets or is recordsetclone different? (Just a thought)
 
Create a label called "lblNavigate" on the form and use this code in the On Current event:

If Me.NewRecord Then
Me!lblNavigate.Caption = "New Record"
Else
With Me.RecordsetClone
Me.RecordsetClone.MoveLast
.Bookmark = Me.Bookmark
Me!lblNavigate.Caption = "Record " & _
Me.CurrentRecord _
& " of " & .RecordCount
End With
End If
 
Jack,

You are a star. Thanks ever so much for all your help.

Thanks
Geoff
 

Users who are viewing this thread

Back
Top Bottom