HELP! Display a query result into form

leanne

New member
Local time
Today, 23:26
Joined
Jun 16, 2010
Messages
7
Dear All,

Good Day! I need your guidance to solve this problem. I have been stuck for 2 days already.

I am having a form and the record source is link from a table called tblTask.
tblTask keeps many different field and many different date.

In the form, after I enter the Start Date and End Date for the task, the system should show me the Workdays.

The Workdays will come from query, qry3. After I did some calculation.


Now, I manage to query the workdays for a particular task already, but I don't know how to show the result into the form.
Besides that, there will be more than one fields which need to display the result from different queries, so I cannot link the form to a query.

I have tried to use the DLookUp method but it show the error 2001.

I am attaching with my sample code and I really hope you all can help me to solve this problem.


TQVM!
 

Attachments

You haven't setup your Table Relationships.

tblAL2 has UserID and tblTask has UserID - Change tblTask UserID to TaskID and add UserID as a field in tablTask, not the Primary Key.

You haven't set your tables Primary Keys

qry3 has PID, Workday, CountOfAlDate and TotalWorkday.


tblTask has UserID, PID, PStartDate and PEndDate

I have added a subform for qry3 on your form and linked master child fields by PID.

If this shows you what you want, just play with the cosmetics and when finished you wont know it is a form and subform.
 

Attachments

Users who are viewing this thread

Back
Top Bottom