Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

synchonizing records on two subforms

Status
Not open for further replies.

tdrBates

MIS
Nov 22, 2002
60
US
I'm a novice MS Access programmer. I have a MainForm with SubForm1 and SubForm2. I would like to synchronize records between SubForm1 and SubForm2. The code below gives me the error "No current record".
How can I synchonize records between SubForm1 and SubForm2?


Private Sub cboSubForm2_AfterUpdate()
Dim R As Recordset
Set R = Forms![MainForm]![SubForm1].Form.RecordsetClone
R.FindFirst "TableField = '" & [cboSubForm2] & "'"
Me.Bookmark = R.Bookmark
End Sub

 
Hallo,

Subforms should be used to provide detail of a main form. ie. If your main form is a list of peoples names, your subforms could be a list of their telephone numbers and their email addresses, respectively.
If this is the case, each subform shows data from a separate table. If these three tables are linked by relationships, then the subforms should also be linked. Changing the parent form will change the data diaplayed on the subforms.

To change the data on a subform, you would need to change the parent form, not the other way around.
Obviously I don't know your application, but if you'd like to post some more details I'll have a look into it.
Try to explain what you want the user to be able to see and do.

- Frink

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top