From: sg on
Thanks again for your quick response. I'll test out a couple of things and
see what's going on and what works best.

"Dirk Goldgar" wrote:

> "sg" <sg(a)discussions.microsoft.com> wrote in message
> news:F42FC6B2-D9C7-4734-9699-F689DE1F0213(a)microsoft.com...
> > Well, I thought I was ok, but now I see that it shows one less record in
> > the
> > record counter than what is really there. Once I move to the next record,
> > the record counter fixes itself, but I know this will be confusing to the
> > user. Any idea how to correct this? Thanks!
>
> Are you sure that it's not just the fact that you're on a new record that is
> throwing you off? The RecordsetClone's RecordCount should show you the
> records that have actually been saved, but when you move to a new blank
> record, Access's CurrentRecord counts that blank record, even before it has
> been saved.
>
> If that's the problem, you can approach it a couple of ways. For example,
> you can have the RecCount text box show "(new record)" instead of "n of m",
> using code like this:
>
> If Me.NewRecord Then
> Me.RecCount = "(new record)"
> Else
> With Me.RecordsetClone
> If .RecordCount <> 0 Then .MoveLast
> Me.RecCount = Me.CurrentRecord & " of " & .RecordCount
> End With
> End If
>
> Or you can make it behave like the built-in navigation buttons by (1)
> removing the code from the form's Current event, (2) adding this code code
> to the form's Load event:
>
> Private Sub Form_Load()
>
> With Me.RecordsetClone
> If .RecordCount <> 0 Then .MoveLast
> End With
>
> End Sub
>
> ... and (3) and changing RecCount to a calculated text box with this
> ControlSource expression:
>
> =[CurrentRecord] & " of " & RecordsetClone.RecordCount+Abs([NewRecord])
>
> (Note: the above expression was entered all on one line, though the
> newsreader may have broken it onto multiple lines.)
>
> --
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)
>
From: sg on
Wanted to let you know that the first option you suggested for me worked
great. Sorry it took so long to reply - I've just now been able to work on
it. Thanks again for all your help.

"Dirk Goldgar" wrote:

> "sg" <sg(a)discussions.microsoft.com> wrote in message
> news:F42FC6B2-D9C7-4734-9699-F689DE1F0213(a)microsoft.com...
> > Well, I thought I was ok, but now I see that it shows one less record in
> > the
> > record counter than what is really there. Once I move to the next record,
> > the record counter fixes itself, but I know this will be confusing to the
> > user. Any idea how to correct this? Thanks!
>
> Are you sure that it's not just the fact that you're on a new record that is
> throwing you off? The RecordsetClone's RecordCount should show you the
> records that have actually been saved, but when you move to a new blank
> record, Access's CurrentRecord counts that blank record, even before it has
> been saved.
>
> If that's the problem, you can approach it a couple of ways. For example,
> you can have the RecCount text box show "(new record)" instead of "n of m",
> using code like this:
>
> If Me.NewRecord Then
> Me.RecCount = "(new record)"
> Else
> With Me.RecordsetClone
> If .RecordCount <> 0 Then .MoveLast
> Me.RecCount = Me.CurrentRecord & " of " & .RecordCount
> End With
> End If
>
> Or you can make it behave like the built-in navigation buttons by (1)
> removing the code from the form's Current event, (2) adding this code code
> to the form's Load event:
>
> Private Sub Form_Load()
>
> With Me.RecordsetClone
> If .RecordCount <> 0 Then .MoveLast
> End With
>
> End Sub
>
> ... and (3) and changing RecCount to a calculated text box with this
> ControlSource expression:
>
> =[CurrentRecord] & " of " & RecordsetClone.RecordCount+Abs([NewRecord])
>
> (Note: the above expression was entered all on one line, though the
> newsreader may have broken it onto multiple lines.)
>
> --
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)
>