Go to next (UNIQUE) record

Westside1st

New Member
Joined
Oct 17, 2022
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
Hello experts

I'm having an issue solving this puzzle

I have a query which include linked tables
(please check the uploaded Image)

In the form I had a command button that had a VBA code On Click

DoCmd.GoToRecord , , acNext

My issue is that the REQ_NO field contain a duplicate records because of the linked table ... So when I go to next record by clicking the command button it shows me the same record details multiple time

for example :

I'm in record no. 12 when I click next it moves to 13 when I click next again it moves to 14 ... but when I'm in record 29 and I click next it moves to 29 and when I click next again it moves to 29 and I click next for the forth time then it moves to 30 .
And that because 29 is a three records in the query.

So is there a way to tell the access to move from 29 to 30 and from 30 to 31 without going through all the duplicated record ???

Thank you all
 

Attachments

  • Records.JPG
    Records.JPG
    52 KB · Views: 11
You do not say why you want to do that? :(
If you only want one record for each reqno, then I believe you just group on that field, and it might be random, what the other data holds, but that would get you what you want?
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top