Access 2010 BrowseTo shows only ONE record (1 Viewer)

sahm

New member
Local time
Today, 07:40
Joined
Dec 11, 2013
Messages
1
Hi,

The following code browse from one form to another and

shows the record details I select in the first form which is what I

need, however, the problem is it only shows that record and

will not allow me go to next or previous records when pressing

NEXT or PREVIOUS by saying this is the First Record or this is

the Last Record.

Anyway to modify it to allow me navigate to other records.




Dim txtJobNumber As Integer

Private Sub Job_Number_DblClick(Cancel As Integer)

'Store Job_Number in txtJobNumber variable and display

message to show value.
txtJobNumber = [Job_Number]

'Create a Temporary Variable called "varsJobNumber" and

store the "txtJobNumber" in it.
TempVars.Add "varsJobNumber", txtJobNumber

'Browse to another form with a condition that the record is

equal to selected [Job_Number] and stored in "varsJobNumber"

temporary variable.
DoCmd.BrowseTo acForm, "OrderDetails",

"Main.NavigationSubform", "[Job_Number]= [TempVars]!

[varsJobNumber]", "", 1


End Sub



Many thanks.

Sahm
 

mrojas

Registered User.
Local time
Today, 07:40
Joined
Sep 8, 2012
Messages
22
Could you share with us a copy of your database (scrub it if you have sensitive data). This way we can see what you're running into.
 

boblarson

Smeghead
Local time
Today, 07:40
Joined
Jan 12, 2001
Messages
32,059
You need to use this method instead:

http://www.baldyweb.com/Bookmark.htm

The way you are currently doing it is filtering for a specific record so that is the one that is returned.
 

Users who are viewing this thread

Top Bottom