status bar modification

P

Pam

I have a form created and I would like to be able to see
the number of records like is shown on the status bar with
the right and left arrow to move through the records. The
only problem I do not want the button that adds a new
record (the arrow with the *). I have created an add new
record button on the form and a previous and next button.
I'm afraid that people entering will accidentally click on
that button on the status bar, but I like the 1 of 50 to
show what record you are on and how many are in the data
base. Is there a way to add this to my form or modify the
buttons on the status bar? Thanks
 
V

Van T. Dinh

Create a Textbox on your Form and set the ControlSource to:

= "Record " & [CurrentRecord] & " of " & [Recordset].[RecordCount]

including the equal sign.

If you have a slow computer, occasionally when you first open the Form, it
will show:

"Record 1 of 1"

regardless of the number of Records in the Form's RecordSource. Re-post if
you have this problem.
 
K

Kelvin

You can also add

Recordset.MoveLast
Recordset.MoveFirst

in the On Open event of the form. This will always make sure the count is
correct. This won't work if there are no records so check for that before
running the above.

Kelvin

Van T. Dinh said:
Create a Textbox on your Form and set the ControlSource to:

= "Record " & [CurrentRecord] & " of " & [Recordset].[RecordCount]

including the equal sign.

If you have a slow computer, occasionally when you first open the Form, it
will show:

"Record 1 of 1"

regardless of the number of Records in the Form's RecordSource. Re-post if
you have this problem.

--
HTH
Van T. Dinh
MVP (Access)



Pam said:
I have a form created and I would like to be able to see
the number of records like is shown on the status bar with
the right and left arrow to move through the records. The
only problem I do not want the button that adds a new
record (the arrow with the *). I have created an add new
record button on the form and a previous and next button.
I'm afraid that people entering will accidentally click on
that button on the status bar, but I like the 1 of 50 to
show what record you are on and how many are in the data
base. Is there a way to add this to my form or modify the
buttons on the status bar? Thanks
 

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

Top