Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 26th, 2005, 09:55 AM
Friend of Wrox
 
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to link form and subform

Hi every body. i made a bounded data entry form that is based on a form and a sub form. But when i try to run it i get many errors. I be happy if some one help me how i link these two tables since draging the sub form to the form did not establish the reletion automatically! I be happy if some one teach me how to link form and sub form together. Below u can see the two query which is for the main form and sub form.thanks


http://i5.photobucket.com/albums/y18...constraint.jpg =====> table reletionships pic

QTimeKeepingemployeno,name ==>query

Code:
SELECT dbo_Employee.employeeno, [dbo_Employee]![lastname] AS EmpName
FROM dbo_Employee;
subform query:

[code]

SELECT dbo_Hours_worked.*, dbo_Task.description
FROM dbo_Hours_worked INNER JOIN dbo_Task ON dbo_Hours_worked.Task = dbo_Task.taskcode;

[/code}
 
Old July 30th, 2005, 02:19 AM
Friend of Wrox
 
Join Date: Jul 2005
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

On the property sheet for the sub form, on the data tag, set the master/child link properties.

If Access did not set then, then the relationship was not defined or the queries for the forms do not have the correct key fields.

Boyd
Access Based Accounting/Business Solutions developer.





Similar Threads
Thread Thread Starter Forum Replies Last Post
form/subform problem chacquard Access VBA 1 November 21st, 2006 06:50 PM
Printing a form with a subform in it jcalfg Access 1 July 25th, 2006 03:40 PM
Open a subform from a form Vision G Access 5 May 13th, 2006 04:21 AM
Cant print when the form become subform yikchin Access 6 November 22nd, 2005 10:22 PM
form/subform reference tmc Access 1 August 7th, 2004 04:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.