Record Selector.

L

.Len B

I have a subform whose default view is SingleForm.
I have disabled the Record Selector and the Navigation
Buttons as meaningless in the context of the parent form
and sized everything accordingly.

Nevertheless, I would like the information they convey to
be available discretely on the subform at least for the
time being during development and testing.

Is there a way to display this info in say a textbox? I do
not need to see the arrowhead or the editor's pencil symbols.
just some indication of which would be there if the Selector
was enabled.
 
C

Crystal (strive4peace)

Hi Len,

if you are using a version of Access below 2007, you can
show the number of records directly in a textbox control :

ControlSource --> =[Form].Recordset.Recordcount & " records"

if you are using 2007, you need to calculate this in code to
display in a textbox on the current event of the main form
and the AfterUpdate and AfterDeleteConfirm events of the subform

in code:
me.controlname =me.Recordset.Recordcount & " records"
or
me.subform_controlname.form.controlname
=me.subform_controlname.form.Recordset.Recordcount & " records"

Warm Regards,
Crystal
remote programming and training
http://MSAccessGurus.com

free video tutorials
http://www.YouTube.com/user/LearnAccessByCrystal

Access Basics
http://www.AccessMVP.com/strive4peace
free 100-page book that covers essentials in Access

*
:) have an awesome day :)
*
 
D

Dirk Goldgar

Crystal (strive4peace) said:
Hi Len,

if you are using a version of Access below 2007, you can show the number
of records directly in a textbox control :

ControlSource --> =[Form].Recordset.Recordcount & " records"

In my experience, you can leave off the "[Form].":

=[Recordset].[Recordcount] & " records"
if you are using 2007, you need to calculate this in code

I think that depends on whether you have Jet sandbox mode enabled or
disabled. With sandbox mode turned off, the exact same expression as above
works for me in A2007.
 
C

Crystal (strive4peace)

Hi Dirk,

thanks, that is nice to know ... how do you turn it off?

Warm Regards,
Crystal
remote programming and training
http://MSAccessGurus.com

free video tutorials
http://www.YouTube.com/user/LearnAccessByCrystal

Access Basics
http://www.AccessMVP.com/strive4peace
free 100-page book that covers essentials in Access

*
:) have an awesome day :)
*


Dirk said:
Crystal (strive4peace) said:
Hi Len,

if you are using a version of Access below 2007, you can show the
number of records directly in a textbox control :

ControlSource --> =[Form].Recordset.Recordcount & " records"

In my experience, you can leave off the "[Form].":

=[Recordset].[Recordcount] & " records"
if you are using 2007, you need to calculate this in code

I think that depends on whether you have Jet sandbox mode enabled or
disabled. With sandbox mode turned off, the exact same expression as
above works for me in A2007.
 
L

.Len B

Hi Crystal,
I can't make that work. Access 2003.

I tried cut and paste from your post.
=[Form].Recordset.Recordcount & " records"
It removed [ ] from Form. I put them back. It added them around
RecordSet and RecordCount. I tried some other fiddling and it put
quotes around everything for me.

None of these worked so I tried your code option. Working on the
subform alone to isolate any possible problem with the parent, I
added your code to the two After... events. i.e.
Me.txtRecords = Me.Recordset.RecordCount

I then began entering a date. I then pressed Esc a few times until
the editors pencil symbol changed to the arrowhead. Neither After...
event fired.

I can't make the Record Selector thing happen either. I tried -

I created txtRecSelector ControlSource="Editing" Visible=No
I used Form_Dirty to make it visible but Form_Undo still thinks
the form is dirty even with the arrowhead symbol returns so I can't
make the txtRecSelector invisible.

I am at the point where I want to re-enable the Navigation Buttons
and Record Selector to save my hair. I have so little of it left.

Apart from a wig, do you have any suggestions?

--
Len
______________________________________________________
remove nothing for valid email address.
| Hi Len,
|
| if you are using a version of Access below 2007, you can
| show the number of records directly in a textbox control :
|
| ControlSource --> =[Form].Recordset.Recordcount & " records"
|
| if you are using 2007, you need to calculate this in code to
| display in a textbox on the current event of the main form
| and the AfterUpdate and AfterDeleteConfirm events of the subform
|
| in code:
| me.controlname =me.Recordset.Recordcount & " records"
| or
| me.subform_controlname.form.controlname
| =me.subform_controlname.form.Recordset.Recordcount & " records"
|
| Warm Regards,
| Crystal
| remote programming and training
| http://MSAccessGurus.com
|
| free video tutorials
| http://www.YouTube.com/user/LearnAccessByCrystal
|
| Access Basics
| http://www.AccessMVP.com/strive4peace
| free 100-page book that covers essentials in Access
|
| *
| :) have an awesome day :)
| *
|
|
| .Len B wrote:
| > I have a subform whose default view is SingleForm.
| > I have disabled the Record Selector and the Navigation
| > Buttons as meaningless in the context of the parent form
| > and sized everything accordingly.
| >
| > Nevertheless, I would like the information they convey to
| > be available discretely on the subform at least for the
| > time being during development and testing.
| >
| > Is there a way to display this info in say a textbox? I do
| > not need to see the arrowhead or the editor's pencil symbols.
| > just some indication of which would be there if the Selector
| > was enabled.
| >
 

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