Next Record - Main form - Sub Form has mult rcds

johnhobbis

Registered User.
Local time
Today, 12:51
Joined
Apr 5, 2001
Messages
22
I have a form with a sub form the sub form has multi records ie:
Main form Client details x 1
Sub form Client orders x 20
At the moment when i click next record it just goes to the next sub record and doesnt seem to go anywhere until i click 20 times on the next button on the main form, this indicates that it is going through the subform records before it will let me move onto another clients details.

frm_HDUITU_followup = Main Form [ME]
tbl_followup_visit = Subform [SF]
============================================
Private Sub nextrecord_Click()
On Error GoTo Err_nextrecord_Click

DoCmd.GoToRecord acDataForm, "tbl_followup_visit", acLastRec
DoCmd.GoToRecord acDataForm, "frm_HDUITU_followup", acNext

Exit_nextrecord_Click:
Exit Sub

Err_nextrecord_Click:
MsgBox Err.Description
Resume Exit_nextrecord_Click

End Sub
============================================

when i run this i get error

Object table "tbl_followup_visit" isnt open

I want to click on the next record on the main form and this will make the sub form records go to last and then it will move me on to the next record on the Main Form.


[This message has been edited by johnhobbis (edited 05-19-2001).]

[This message has been edited by johnhobbis (edited 05-19-2001).]
 
If you don't want to move through each record in the subform, set the Record Selector properties of the form and subform (Yes on the form, No on the subform).
 

Users who are viewing this thread

Back
Top Bottom