473,418 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

how to know the record position shown in a form?

I have a form that shows a table in single form format.
how can I know the position of the record the form is current showing
so that I can enable or disable some buttons according to the position
information.
For example if the form is showing the first record I need to disable
the Previous button, and for the last record I need to disable the Next
button, etc.
Thanks

Dec 14 '05 #1
3 6432
Hello
Access navigation buttons do it for you. Haven't you noticed that when
you are at the first record, button Go To Previous is disabled? Button
Go To Next is disabled, when you are at the last record, if the form
doesn't allow to add records. If the form does, the button is not
disabled because Go To Next creates a new record in this case. Hope it
helps.
Galka

zh**********@hotmail.com wrote:
I have a form that shows a table in single form format.
how can I know the position of the record the form is current showing
so that I can enable or disable some buttons according to the position
information.
For example if the form is showing the first record I need to disable
the Previous button, and for the last record I need to disable the Next
button, etc.
Thanks


Dec 14 '05 #2
On 13 Dec 2005 20:47:14 -0800, zh**********@hotmail.com wrote:
I have a form that shows a table in single form format.
how can I know the position of the record the form is current showing
so that I can enable or disable some buttons according to the position
information.
For example if the form is showing the first record I need to disable
the Previous button, and for the last record I need to disable the Next
button, etc.
Thanks


If you are replacing the built in navigation buttons with your own
command buttons, you can use, in the Form's Current event:

cmdPreviousButton.Enabled = Not Me.CurrentRecord = 1
cmdNextButton.Enabled = Me.CurrentRecord = 1 Or Me.CurrentRecord <
Me.Recordset.RecordCount

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Dec 14 '05 #3
Thanks Fred. Yes that's what I want.
all the best
If you are replacing the built in navigation buttons with your own
command buttons, you can use, in the Form's Current event:

cmdPreviousButton.Enabled = Not Me.CurrentRecord = 1
cmdNextButton.Enabled = Me.CurrentRecord = 1 Or Me.CurrentRecord <
Me.Recordset.RecordCount

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


Dec 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joachim Bauer | last post by:
I'm using the code below to display a menu that opens when the mouse goes over the main menu item (try it in your browser to understand the behaviour). It uses "position:absolute" and a switch...
5
by: HJ | last post by:
Hi all, Consider an Access 2002 run-time application on Windows XP. The controls on a form are locked until the user clicks an Edit button. The form is based on a query and all controls are...
6
by: Prakash | last post by:
Hi !! In a Continuous Form with say 10 records, I'd like to have 1 button with an "UP" Arrow & another button with a "DOWN" arrow. By pressing either the Up or the Down Arrow, I'd like the user...
3
by: Typehigh | last post by:
I am a good programmer, but this one stumps me! I have a form with a continuous subform. The continuous subform contains records of data and may reach a depth of 1000's of entities. I have...
16
by: usenet | last post by:
I want to be able to use the record numbers of a sub-form, are they available anyhow in VB (Access 2003)? I want to use the sub-form record number as *part* of the primary key for the table...
4
by: Kaur | last post by:
I am reposting this message. I am a beginner using MS Access. I am working in MS Access 2000 and have created two forms. Form 1 is called frmParent (which has a read only subform called SfrmChild)....
4
by: Bakarre | last post by:
I have problem in retrieving record from mysql using php form, I was able to retrieve the record, if I edit, the changes is not updated in mysql. find below my code <html> <body> <?php $db =...
1
by: farhan31 | last post by:
Hello all I have Two tables.Table 1 and table 2.Table 1 has one to many relation with Table 2.I have one main form Form1 based on table 1.On form 1 i have a sub form based on table 2.I have put a...
1
by: MerlinS | last post by:
Using Access 2003. I have a form and a subform. On the main form, one of the fields is a lost box, which lists line numbers ie 1, 2, 3 etc. Then the list box is clicked, the subform corresponding...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.