Record Count

  • Thread starter Thread starter Andi B
  • Start date Start date
A

Andi B

Greetings all!

In an Access database I am creating, I am using a form to display
information. This form has its record navigator turned off as I am using my
own buttons for a more professional look. What I would like to know is, is
it possible to duplicate the "Record X of Y" that appears on the standard
record navigator? I have used code from
http://www.mvps.org/access/forms/frm0026.htm and while this works, it only
displays "Record 1 of 1" until I navigate to another record, whereupon it
will correct itself to read "Record 2 of 349" - is there a way to avoid it
displaying incorrectly in the first instance? (The number of records in the
database can change as users add or delete entries, so using a constant
wouldn't work...)

Many thanks in advance of any assistance,

Regards


Andi
 
It's doubtlessly due to the fact that not all of the records have been read
when it displays the first record, so it doesn't know what the total count
it going to be.

See whether what Stephen Lebans has at
http://www.lebans.com/recnavbuttons.htm solves this problem (knowing
Stephen, I'm sure he's figured it out!)
 
When you open a table it is neccessary to do a recordset.movelast and then
immediately a recordset.movefirst. Without that you can never rely on
recordcount
 
If you are using ADO and you set the cursor type to adOpenKeyset after
opening, the .recordcount property will give you the correct recordcount
without having to scroll front-to-back through the recordset.
 
Andi B said:
Greetings all!

In an Access database I am creating, I am using a form to display
information. This form has its record navigator turned off as I am using
my own buttons for a more professional look. What I would like to know is,
is it possible to duplicate the "Record X of Y" that appears on the
standard record navigator? I have used code from
http://www.mvps.org/access/forms/frm0026.htm and while this works, it only
displays "Record 1 of 1" until I navigate to another record, whereupon it
will correct itself to read "Record 2 of 349" - is there a way to avoid it
displaying incorrectly in the first instance? (The number of records in
the database can change as users add or delete entries, so using a
constant wouldn't work...)

Many thanks in advance of any assistance,

Regards


Andi
 
Douglas J. Steele said:
It's doubtlessly due to the fact that not all of the records have been
read when it displays the first record, so it doesn't know what the total
count it going to be.

See whether what Stephen Lebans has at
http://www.lebans.com/recnavbuttons.htm solves this problem (knowing
Stephen, I'm sure he's figured it out!)
 
martin W said:
When you open a table it is neccessary to do a recordset.movelast and then
immediately a recordset.movefirst. Without that you can never rely on
recordcount
 
Alex White MCDBA MCSE said:
If you are using ADO and you set the cursor type to adOpenKeyset after
opening, the .recordcount property will give you the correct recordcount
without having to scroll front-to-back through the recordset.

--
Regards

Alex White MCDBA MCSE
http://www.intralan.co.uk
 
Alex White MCDBA MCSE said:
If you are using ADO and you set the cursor type to adOpenKeyset after
opening, the .recordcount property will give you the correct recordcount
without having to scroll front-to-back through the recordset.

--
Regards

Alex White MCDBA MCSE
http://www.intralan.co.uk
 
martin W said:
When you open a table it is neccessary to do a recordset.movelast and then
immediately a recordset.movefirst. Without that you can never rely on
recordcount
 
Andi B said:
Greetings all!

In an Access database I am creating, I am using a form to display
information. This form has its record navigator turned off as I am using
my own buttons for a more professional look. What I would like to know is,
is it possible to duplicate the "Record X of Y" that appears on the
standard record navigator? I have used code from
http://www.mvps.org/access/forms/frm0026.htm and while this works, it only
displays "Record 1 of 1" until I navigate to another record, whereupon it
will correct itself to read "Record 2 of 349" - is there a way to avoid it
displaying incorrectly in the first instance? (The number of records in
the database can change as users add or delete entries, so using a
constant wouldn't work...)

Many thanks in advance of any assistance,

Regards


Andi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top