473,396 Members | 1,866 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,396 software developers and data experts.

Next / Previous Record Buttons

Hi All,

I would like some advice on Next / Previous record buttons.

I have a main form for the client, and a continuous subform listing
client transactions. If I open one of these transactions ( dblclick )
in say 'frmtransaction', I would like to scroll forward and backward
through the transactions as they appear on the continuous subform
without actually having to close 'frmtransaction' and go back to the
subform.

The Next / Previous buttons produced by the wizard work well, but only
move by record number, not by transaction date.

Regards

Karl
Nov 13 '05 #1
9 6686
Karl,

Change your subform recordsource to a query based oin your client transactions,
include the transaction date in the query and sort descending. Your records will
be in order of the transaction date and you can use the built-in navigation
buttons to move by transaction date.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Karl Roes" <ka******@hotmail.com> wrote in message
news:7c**************************@posting.google.c om...
Hi All,

I would like some advice on Next / Previous record buttons.

I have a main form for the client, and a continuous subform listing
client transactions. If I open one of these transactions ( dblclick )
in say 'frmtransaction', I would like to scroll forward and backward
through the transactions as they appear on the continuous subform
without actually having to close 'frmtransaction' and go back to the
subform.

The Next / Previous buttons produced by the wizard work well, but only
move by record number, not by transaction date.

Regards

Karl

Nov 13 '05 #2
Hi,

This suggestion of using the built-in navigations buttons does work
very well when moving within the subform itself.
Enabling the built-in navigation buttons on the form that opens from
this subform doesn't seem to restrict records to only those client
records on the subform from which it opens, it still scrolls through
all transactions for all clients.

Thank you for your time.

Regards

Karl


"PC Datasheet" <no****@nospam.spam> wrote in message news:<_A****************@newsread2.news.atl.earthl ink.net>...
Karl,

Change your subform recordsource to a query based oin your client transactions,
include the transaction date in the query and sort descending. Your records will
be in order of the transaction date and you can use the built-in navigation
buttons to move by transaction date.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Karl Roes" <ka******@hotmail.com> wrote in message
news:7c**************************@posting.google.c om...
Hi All,

I would like some advice on Next / Previous record buttons.

I have a main form for the client, and a continuous subform listing
client transactions. If I open one of these transactions ( dblclick )
in say 'frmtransaction', I would like to scroll forward and backward
through the transactions as they appear on the continuous subform
without actually having to close 'frmtransaction' and go back to the
subform.

The Next / Previous buttons produced by the wizard work well, but only
move by record number, not by transaction date.

Regards

Karl

Nov 13 '05 #3
Hi,

I think I have worked this out. :-)

I changed the recordset of the detail form ( the one that opens from
the subform ) to the same as the subform from which it opens and set
the ClientID to be the same as the Parent of the subform.
I had the datasource of the detail form reading directly back to the
tables - no wonder all the records were showing up and not just the
ones for the selected client. ;-\

The built-in navigation buttons work a treat and so do the buttons
created by the wizard. I do need these custom buttons on the form to
navigate - they are easier to see, so is there a way of supressing the
' ...end of recordset' msgbox when using these?
Regards

Karl


"PC Datasheet" <no****@nospam.spam> wrote in message news:<_A****************@newsread2.news.atl.earthl ink.net>...
Karl,

Change your subform recordsource to a query based oin your client transactions,
include the transaction date in the query and sort descending. Your records will
be in order of the transaction date and you can use the built-in navigation
buttons to move by transaction date.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Karl Roes" <ka******@hotmail.com> wrote in message
news:7c**************************@posting.google.c om...
Hi All,

I would like some advice on Next / Previous record buttons.

I have a main form for the client, and a continuous subform listing
client transactions. If I open one of these transactions ( dblclick )
in say 'frmtransaction', I would like to scroll forward and backward
through the transactions as they appear on the continuous subform
without actually having to close 'frmtransaction' and go back to the
subform.

The Next / Previous buttons produced by the wizard work well, but only
move by record number, not by transaction date.

Regards

Karl

Nov 13 '05 #4
Hi,

There I go again. ;-/

That msgbox actually reads " You can't go to the specified record ".

Regards

Karl


"PC Datasheet" <no****@nospam.spam> wrote in message news:<_A****************@newsread2.news.atl.earthl ink.net>...
Karl,

Change your subform recordsource to a query based oin your client transactions,
include the transaction date in the query and sort descending. Your records will
be in order of the transaction date and you can use the built-in navigation
buttons to move by transaction date.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Karl Roes" <ka******@hotmail.com> wrote in message
news:7c**************************@posting.google.c om...
Hi All,

I would like some advice on Next / Previous record buttons.

I have a main form for the client, and a continuous subform listing
client transactions. If I open one of these transactions ( dblclick )
in say 'frmtransaction', I would like to scroll forward and backward
through the transactions as they appear on the continuous subform
without actually having to close 'frmtransaction' and go back to the
subform.

The Next / Previous buttons produced by the wizard work well, but only
move by record number, not by transaction date.

Regards

Karl

Nov 13 '05 #5
ka******@hotmail.com (Karl Roes) wrote in message news:<7c**************************@posting.google. com>...
The built-in navigation buttons work a treat and so do the buttons
created by the wizard. I do need these custom buttons on the form to
navigate - they are easier to see, so is there a way of supressing the
' ...end of recordset' msgbox when using these?


When I use custom navigation buttons I like to wrap by going back to
the beginning of the recordset when they go past the end and by going
to the end when they go before the beginning. Of course, they might
get confused by this if you don't show which record of the total
number of records they are on.

James A. Fortune
Nov 13 '05 #6
Handle error 2105 in your error handler for the procedure e.g.

Dim Response As Integer
Select Case Err.number
Case 2105
Response = acDataErrContinue
Case Else
MsgBox Err.number & ": " & Err.Description
End Select

HTH
Nov 13 '05 #7

ka******@hotmail.com (Karl Roes) wrote in message
news:<7c**************************@posting.google. com>...
The built-in navigation buttons work a treat and so do the
buttons created by the wizard. I do need these custom buttons
on the form to navigate - they are easier to see, so is there
a way of supressing the ' ...end of recordset' msgbox when
using these?


Add a guard clause around the code the wizard created:

If (Me.Recordset.AbsolutePosition + 1) _
< Me.Recordset.RecordCount Then
DoCmd.GoToRecord , , acNext
End If

absolute position is 0-based,

Bob Q.
Nov 13 '05 #8
In message <Xn**********************@66.150.105.50>, Bob Quintal
<bq******@generation.net> writes

ka******@hotmail.com (Karl Roes) wrote in message
news:<7c**************************@posting.google .com>...
The built-in navigation buttons work a treat and so do the
buttons created by the wizard. I do need these custom buttons
on the form to navigate - they are easier to see, so is there
a way of supressing the ' ...end of recordset' msgbox when
using these?


Add a guard clause around the code the wizard created:

If (Me.Recordset.AbsolutePosition + 1) _
< Me.Recordset.RecordCount Then
DoCmd.GoToRecord , , acNext
End If

absolute position is 0-based,


You could also try something like this in your error handler:

If Err = 2105 Then
'Do Nowt much
'Beep
Else
MsgBox (Str(Err) & " - " & Err.DESCRIPTION)
End If


--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.

Nov 13 '05 #9
Bernard Peek <ba*@shrdlu.com> wrote in
news:y0**************@shrdlu.com:
In message <Xn**********************@66.150.105.50>, Bob
Quintal <bq******@generation.net> writes

ka******@hotmail.com (Karl Roes) wrote in message
news:<7c**************************@posting.googl e.com>...
The built-in navigation buttons work a treat and so do the
buttons created by the wizard. I do need these custom
buttons on the form to navigate - they are easier to see, so
is there a way of supressing the ' ...end of recordset'
msgbox when using these?


Add a guard clause around the code the wizard created:

If (Me.Recordset.AbsolutePosition + 1) _
< Me.Recordset.RecordCount Then
DoCmd.GoToRecord , , acNext
End If

absolute position is 0-based,


You could also try something like this in your error handler:

If Err = 2105 Then
'Do Nowt much
'Beep
Else
MsgBox (Str(Err) & " - " & Err.DESCRIPTION)
End If

Yes, but the theorists and gurus here suggest that it is better
to prevent errors than handle them. I'm neither a theorist nor a
guru, but I accept their ideas.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #10

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

Similar topics

10
by: george | last post by:
Can anyone help? I query a database and return a result on the column "reference". There might be 7 listings. Each row is displayed in a table, with links through to a detail page. I am working...
3
by: Psybar Phreak | last post by:
hi all, im developing a site in perl with mason on a postgreSQL backend. i currently have a page that lists all items in a table, but would like to do the " << PREVIOUS 1 2 3 4 NEXT>> "...
0
by: James | last post by:
Hello group: I don't know if this is by design, or something I can change: I recently migrated one of our Access tables to SQL server. Now, when the form bound to the query for that table is...
1
by: David | last post by:
What I envision is this. The user gets a set of records in a data grid Then the user gets to select one of the rows to view the detail information about the record. Then instead of backing...
0
by: David C | last post by:
I am gathering some ideas. Just like after you open up an email, on the screen are the previous and next buttons. You can navigation to the next or previous record. So how would you maintain...
3
by: dianaj86 | last post by:
I have multiple dropdownlists each one filled with values from a specific column in the table. Also I have multiple textboxes corresponding to dropdownlists. For example, when I select an item from...
1
by: cbanks | last post by:
Hello Ladies/Gents, im in need of some serious help here.. I have a tool that allows users to view information on a form and make changes to recordsets. This tool has buttons that allow a user to...
8
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
13
by: sweetline priya | last post by:
in my project, a table called 'hardware' contains merely 5000 records..its a mysql database.. the user can add, modify or can view this hardware details one by one.. while clicking 'view' button, the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.