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!

Linking a subform table on a form to a record set

Status
Not open for further replies.

dannb

Technical User
Mar 4, 2005
4
GB
Hi
Here is the scenario im currently working on a purchase order database using microsoft access. i have created a form called PRODUCT INFO which basically allows user to enter add and delete product records which are stored in the PRODUCT INFORMATION table..i have based the form on the PRODUCT INFORMATION table and used individual fields at the top of the form -

..................................................
Product Code: abc Cost Per Unit:5
Product Description: tile Unit:SQM
..................................................

i also have a subform which is also based on the PRODUCT INFORMATION displaying all the records.

..................................................
Product Code | Product Description | C.P.U| Unit
abc tile 5 SQM
bcd tile 2 10 SQM
..................................................

now heres where im stuck i want the user to be able to click on a record (e.g. bcd) in the subform and that record displayed as above in the appropriate fields. I would be very grateful if somebody could tell me how to do this. please could you explain it in simple terms because i have little knowledge of SQL and am using the visual interface. Thanks.
 
Provided the mainform and the subform have the same RecordSource property you may try something like this in the Current event procedure of the subform:
Forms![main form name].Bookmark = Me.Bookmark

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top