473,472 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to jump from one record to another on a form with fixed field value?

I have a form with a combo account manager (choose the name)

I have record navigation buttons on that form, along with other
fields.

I do not use queries, only tables. One of the tables is the table
account manager names and a table with the data from the form.

How to add a button that jumps to the next record (and previous) with
the same name as account manager as the record where I start to
navigate?

This means also that when I choose another acc man. it will jump to
another record with that value.

I am quite well know in Access and VB, but its hard for me to find the
right code.

Thank you and happy eastern.

Bart
Access 2003

Apr 7 '07 #1
2 4092
I made the following code, but that results in an error. In ComboAM
the names of the AM can be choosen.

Private Sub NextAM_Click()
On Error GoTo Err_NextAM_Click
DoCmd.GoToRecord , acActiveDataObject, "ComboAM", acNext, 1
' DoCmd.GoToRecord , , acGoTo, 1
Exit_NextAM_Click:
Exit Sub

Err_NextAM_Click:
MsgBox Err.Description
Resume Exit_NextAM_Click

End Sub

AA Arens wrote:
I have a form with a combo account manager (choose the name)

I have record navigation buttons on that form, along with other
fields.

I do not use queries, only tables. One of the tables is the table
account manager names and a table with the data from the form.

How to add a button that jumps to the next record (and previous) with
the same name as account manager as the record where I start to
navigate?

This means also that when I choose another acc man. it will jump to
another record with that value.

I am quite well know in Access and VB, but its hard for me to find the
right code.

Thank you and happy eastern.

Bart
Access 2003
Apr 7 '07 #2
suggest you filter the form based on the value chosen in the combo box
control, so that when you choose AM so-and-so, you only see the records for
so-and-so. record navigation then becomes a non-issue.

hth
"AA Arens" <ba***********@gmail.comwrote in message
news:11*********************@n59g2000hsh.googlegro ups.com...
I made the following code, but that results in an error. In ComboAM
the names of the AM can be choosen.

Private Sub NextAM_Click()
On Error GoTo Err_NextAM_Click
DoCmd.GoToRecord , acActiveDataObject, "ComboAM", acNext, 1
' DoCmd.GoToRecord , , acGoTo, 1
Exit_NextAM_Click:
Exit Sub

Err_NextAM_Click:
MsgBox Err.Description
Resume Exit_NextAM_Click

End Sub

AA Arens wrote:
I have a form with a combo account manager (choose the name)

I have record navigation buttons on that form, along with other
fields.

I do not use queries, only tables. One of the tables is the table
account manager names and a table with the data from the form.

How to add a button that jumps to the next record (and previous) with
the same name as account manager as the record where I start to
navigate?

This means also that when I choose another acc man. it will jump to
another record with that value.

I am quite well know in Access and VB, but its hard for me to find the
right code.

Thank you and happy eastern.

Bart
Access 2003

Apr 7 '07 #3

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

Similar topics

17
by: Rick | last post by:
Hi all, Is there a MySQL function to get the first record through a query? I would like to open a page of client records with the first one shown. The other records can be accessed from a...
3
by: Steven Stewart | last post by:
Hi there, I have posted about this before, but yet to arrive at a solution. I am going to try to explain this better. I have an Employees table and a Datarecords table (one-to-many...
15
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any...
5
by: tdmailbox | last post by:
I have a form with a child form. In the child form there is a list of names that can grow quite large. On the parent form I want to display the first name from the child form. I set up a test...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
6
by: kaosyeti | last post by:
hey.... i have a duplicate record issue i could use some help with. on a form that has 2 unbound controls, txtboxyear and cboxmonth, together will automatically fill in an invisible txtboxdate...
2
by: Mark Reed | last post by:
Hi All, I have created a multi-user application at work which is working perfectly apart from a small problem which I believe to more a of a user issue (maybe some will set me straight on that...
7
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
3
by: mckbill | last post by:
Is there a way I can direct the cursor to a specific field (variable) in a form by typing the field name while in form view? I have a form with many fields, and it would be nice if there were...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.