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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Subform from listbox

Status
Not open for further replies.

TheStriker

Programmer
Aug 19, 2002
109
US
Hello,

I have a main form and a subform with a list box. I want to be able to update the fields on the subform via the selection made in the listbox. I know the wizard can do this for a listbox if the fields are on the main form. I was wondering if anyone had code or can modify this code to update the fields in my subform. Here is the code created by the wizard:

Private Sub List7_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[nCommentID] = " & Str(Nz([List7], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Any help would be most appreciated. Thanks

Striker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top