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

Update a Form based on clicking on a record in a subform

Status
Not open for further replies.

gal4y

Technical User
Dec 24, 2001
72
US
I have a Form that has information about instructors (SSN, Last name, first name and so on) [This is based on query]. Within the form, I have a subform that is based on a query that has last name, first name and phone number.

I want the ability to click on a record on the subform and then for the form to update to that record.

I have tried the following code with no luck.

Private Sub Field61_Click()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Instructor_SSN] = '" & Me![Field61] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub

Thanks for any help in advance

Greg
 
I think you should create a combo box in the form header and query the Tables where you have the Instructor info. and after you have selected the info it should update your form. For a good sample go to Northwind.mdb in the samples directory which comes with every installation of Microsoft access and you will see many forms that do exactly this. look at the properties and event procedures of the form and you will see how to do it.

To find the Nortwind.mdb make a find or search for that name in all of drive C: and you should find it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top