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

Using linkMasterField

Status
Not open for further replies.

Apollo13a

Technical User
Apr 27, 2003
277
US
hello, Is it possible to change the field that links the subform to the master form using LinkMasterField and LinkChildField? I'm trying to set the link field for a subform based on the response from a popup(vbyesNo). I have used some SQL in vba to change this field but if the user inputs more than one record I have to set the link field again to associate the subform record with the master form record. My db has jobnames records on the master form and tools records in the subform. I'm trying to let the user pick a jobname and then if they want to add tools in the subform, I use a msgbox to ask if they want to associate these tools with this job. If vbYes then I would set the link fields. I can set the link fields with vba, but it works for only one record.
Thanks, Jim
 
Got it, I used
Code:
                       With formname 
                           .LinkChildFields= link field
                           .LinkMasterField= link field
                       End With
I guess I was doing something wrong but this works fine.
jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top