Next Record on Parent Form

akjim62

Registered User.
Local time
Yesterday, 20:26
Joined
Apr 18, 2014
Messages
16
I have a parent form tied to one table, and a subform in it that is tied to another table. The relationship is one-to-many, and if there is more than one record in the subform, when clicking next or previous, it scrolls through the subform items. I would like the Previous and Next buttons to move to the Previous or Next parent record, not the child records.
 
You should have navigation buttons for both forms. Could be the main form is too long for you to be able to see them without using the scroll bar. Also check that the main forms Navigation Buttons property is set to Yes.
 
Thanks for the reply. The built-in navigation buttons on the bottom of the main form are visible, but the subform is a data view only, how it needs to be. Whether I use the built-in navigation buttons, or buttons made by the wizard, either way it scrolls through all the child records before moving to the next parent record.
 
So, just to be clear, You can see the built in navigation buttons on both forms and you have buttons on the main form that you created with the wizard and none of these change the record displayed in the main form. Is that correct.
 
Not quite what I'm trying to say. If there is more than one record in the subform, access goes to each of the next records in the subform, and that isn't what I want. I want to go to the next parent record without scrolling through each record in the subform. See the attached form image. I want the Next and Previous buttons to navigate to the next Quote ID, not the individual subform items.
 

Attachments

  • form.jpg
    form.jpg
    85.6 KB · Views: 87
Can you show us the code for the "Next" button on the main form.
 
It is a built-in macro the wizard made:
SelectObject Form, QUOTES_DIRTGLUE, No
GoToRecord Form, QUOTES_DIRTGLUE, Next,
The weird thing is it works properly if I recreate the buttons, but after saving and closing, after reopening the form it starts scrolling through the subform again.
 
Can you post a copy of the db in A2003 mdb format.
 
Hi Bob, just now saw your last message. It won't let me save as 2003, says it has features not available in 2003. Anyhow, it is a front end, so I would have to send you the back end as well.
 
Hi Bob, here is another screen shot with more details.
 

Attachments

  • form.jpg
    form.jpg
    101.3 KB · Views: 67
It is a built-in macro the wizard made:
SelectObject Form, QUOTES_DIRTGLUE, No
GoToRecord Form, QUOTES_DIRTGLUE, Next,
The weird thing is it works properly if I recreate the buttons, but after saving and closing, after reopening the form it starts scrolling through the subform again.
Like most developers, I haven't used macros (except autoexec) for years, so I am unable to help you with those. Your last sentence about the forms behavior seems strange. When Access forms do strange things, it is often a sign of some corruption. IMHO it would be better to create a new form from scratch.
 

Users who are viewing this thread

Back
Top Bottom