ms-access


Custom Record Navigation


Hi I have an App with nested sub-forms, the record navigation is confusing and I've started moving the Record Navigation controls to the top of the forms to improve that. I'm stuck on the 'n of n' field, is there a generic property(s)/query that will give me this?
For the first n, use the AbsolutePosition property of the form's RecordsetClone. see MSDN
For the second n, use the RecordCount property.
Update: I prefer Mike's approach using CurrentRecord. I created a form with 2 text boxes: txtCurrentRecord and txtRecordCount. Then this procedure for the form's On Current event causes the text boxes to display the same values as the built-in navigation bar.
Private Sub Form_Current()
Me.txtCurrentRecord = Me.CurrentRecord
If Not Me.NewRecord Then
Me.txtRecordCount = Me.RecordsetClone.RecordCount
Else
Me.txtRecordCount = Me.CurrentRecord
End If
End Sub
Update2: I added a procedure to Form Load to make sure RecordCount is accurate.
Private Sub Form_Load()
Me.RecordsetClone.MoveLast
Me.RecordsetClone.MoveFirst
End Sub

Related Links

Access 97 copying field type to other table
A query to combine multiple row values into one field in MS-Access 2003? [duplicate]
set two field primary key
Exporting Foreign Key Definitions as DDL Statements from MS Access
Access Mail Merge to different documents based on specific criteria
I just realized my database is not 1NF compliant. Is it necessary that I rebuild the tables?
MSAccess Error: Class does not support Automation or does not support expected interface
Access 2007 ReportEvents class is not firing events
Access subform in a split view parent - hide from datasheet section
2007 Split database access issues
MS-Access (Forms): allow user to enter invalid data in a bound, typed TextBox, with intent of correcting it programmatically. How?
How to add a checkbox in a form next to a query to append to another table
Access VBA - how to download XML file and enter its data into a recordset
MS-Access Calculating Percentage of Completed Tasks in a Report
How can I import data from a table in MS ACCESS 2007 to another table ? [closed]
How to build a query for getting rows having a blank field in access whose datatype is date?

Categories

HOME
angular-material
stock
c#-2.0
autotools
virtualization
maude-system
communication
adobe-analytics
spring-kafka
modx-revolution
u-sql
hex-editors
fortumo
quickfix
serverless-framework
workload-scheduler
after-effects
pc
scichart
amazonsellercentral
java-3d
errorlevel
tar
lcd
fgetcsv
log4js-node
facebook-apps
nat
key-value-observing
geopositioning
environment-modules
jmonkeyengine
git-merge
qwerty
angularjs-factory
user-controls
mesos-chronos
particles.js
thin
skeleton-css-boilerplate
qwt
pango
fancybox-2
statsd
setter
pg-dump
pillow
imanage
iso8601
jspdf-autotable
bind9
lync-client-sdk
django-scheduler
crosswalk-runtime
httplistener
home-directory
underscore.js-templating
skobbler-maps
merge-conflict-resolution
gstreamer-0.10
multiple-regression
lttng
angstrom-linux
blackberry-10
netmq
separator
t4mvc
cyclomatic-complexity
citrus-pay
mono-embedding
cisco-ios
pick
relocation
mdt
applescript-objc
client-side-templating
tld
jquery-layout
poller
hyprlinkr
dbconnection
chronoforms
smtp-auth
http-unit
wsdl-2.0
getmessage
ticoredatasync
cufon
mercurial-server
xmlspy
servicehost
appender
disclosure
iphone-web-app
mysql-error-1005
lang
asp.net-mvc-areas
sproutcore-2
suppress
mozilla-prism
getresponsestream
mirah
castle-monorail
firefox4
brewmp
uimenucontroller
xetex
defensive-programming

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App