If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"#Name?" appearing in place of data from subform
Hi,
I hope you can help me. I have a simple database with 2 tables. (the database is used to store lesson plans) I have created a form with fields from table1 with a subform containing fields from table2 (displayed as a continuous form), all works OK. I have a field in table2 called "time", I have created a query called "time total", to calculate the sum based on the curent record from table1, and when ran, displays the desired result. I created a text box, and using the expression builder, entered the following: = [Time total]![SumOfTime] Which is the result of the query. When the form is displayed, the box displays "#Name?" I have checked out "help" to no avail..Please help Thanks Dave |
#2
|
|||
|
|||
"#Name?" appearing in place of data from subform
If the query resault has only one record, then use DLookUp to retrieve the
value from the query =DLookUp("[SumOfTime]","[Time total]") -- \\// Live Long and Prosper \\// BS"D "Anode123" wrote: Hi, I hope you can help me. I have a simple database with 2 tables. (the database is used to store lesson plans) I have created a form with fields from table1 with a subform containing fields from table2 (displayed as a continuous form), all works OK. I have a field in table2 called "time", I have created a query called "time total", to calculate the sum based on the curent record from table1, and when ran, displays the desired result. I created a text box, and using the expression builder, entered the following: = [Time total]![SumOfTime] Which is the result of the query. When the form is displayed, the box displays "#Name?" I have checked out "help" to no avail..Please help Thanks Dave |
#3
|
|||
|
|||
"#Name?" appearing in place of data from subform
Thanks for the quick reply Ofer.
The query groups by "table1", and then Sums the "time" field in "table2", therefore the result contains all the records from "table1", and the summed "time" field from "table2". The solution you provided gave me a result, but it was the total for all records, not just the one in focus on the parent form. I've taken some screenshots to clarify.. http://www.davestubbs1.f2s.com/Pics/Formwithsubform.jpg http://www.davestubbs1.f2s.com/Pics/query.jpg http://www.davestubbs1.f2s.com/Pics/queryresults.jpg Once again, thanks Dave "Ofer" wrote: If the query resault has only one record, then use DLookUp to retrieve the value from the query =DLookUp("[SumOfTime]","[Time total]") -- \\// Live Long and Prosper \\// BS"D "Anode123" wrote: Hi, I hope you can help me. I have a simple database with 2 tables. (the database is used to store lesson plans) I have created a form with fields from table1 with a subform containing fields from table2 (displayed as a continuous form), all works OK. I have a field in table2 called "time", I have created a query called "time total", to calculate the sum based on the curent record from table1, and when ran, displays the desired result. I created a text box, and using the expression builder, entered the following: = [Time total]![SumOfTime] Which is the result of the query. When the form is displayed, the box displays "#Name?" I have checked out "help" to no avail..Please help Thanks Dave |
#4
|
|||
|
|||
"#Name?" appearing in place of data from subform
In that case
Create a text field in the SubForm form footer, not visible, and in the control source of this field write =Sum([Time FieldName]) On the Main form text box write =[Sub Form control name].Form![Text box name created as specified above] -- HTH, Good Luck BS"D "Anode123" wrote: Thanks for the quick reply Ofer. The query groups by "table1", and then Sums the "time" field in "table2", therefore the result contains all the records from "table1", and the summed "time" field from "table2". The solution you provided gave me a result, but it was the total for all records, not just the one in focus on the parent form. I've taken some screenshots to clarify.. http://www.davestubbs1.f2s.com/Pics/Formwithsubform.jpg http://www.davestubbs1.f2s.com/Pics/query.jpg http://www.davestubbs1.f2s.com/Pics/queryresults.jpg Once again, thanks Dave "Ofer" wrote: If the query resault has only one record, then use DLookUp to retrieve the value from the query =DLookUp("[SumOfTime]","[Time total]") -- \\// Live Long and Prosper \\// BS"D "Anode123" wrote: Hi, I hope you can help me. I have a simple database with 2 tables. (the database is used to store lesson plans) I have created a form with fields from table1 with a subform containing fields from table2 (displayed as a continuous form), all works OK. I have a field in table2 called "time", I have created a query called "time total", to calculate the sum based on the curent record from table1, and when ran, displays the desired result. I created a text box, and using the expression builder, entered the following: = [Time total]![SumOfTime] Which is the result of the query. When the form is displayed, the box displays "#Name?" I have checked out "help" to no avail..Please help Thanks Dave |
#5
|
|||
|
|||
"#Name?" appearing in place of data from subform
Worked like a charm, Thanks Ofer..
"Ofer Cohen" wrote: In that case Create a text field in the SubForm form footer, not visible, and in the control source of this field write =Sum([Time FieldName]) On the Main form text box write =[Sub Form control name].Form![Text box name created as specified above] -- HTH, Good Luck BS"D "Anode123" wrote: Thanks for the quick reply Ofer. The query groups by "table1", and then Sums the "time" field in "table2", therefore the result contains all the records from "table1", and the summed "time" field from "table2". The solution you provided gave me a result, but it was the total for all records, not just the one in focus on the parent form. I've taken some screenshots to clarify.. http://www.davestubbs1.f2s.com/Pics/Formwithsubform.jpg http://www.davestubbs1.f2s.com/Pics/query.jpg http://www.davestubbs1.f2s.com/Pics/queryresults.jpg Once again, thanks Dave "Ofer" wrote: If the query resault has only one record, then use DLookUp to retrieve the value from the query =DLookUp("[SumOfTime]","[Time total]") -- \\// Live Long and Prosper \\// BS"D "Anode123" wrote: Hi, I hope you can help me. I have a simple database with 2 tables. (the database is used to store lesson plans) I have created a form with fields from table1 with a subform containing fields from table2 (displayed as a continuous form), all works OK. I have a field in table2 called "time", I have created a query called "time total", to calculate the sum based on the curent record from table1, and when ran, displays the desired result. I created a text box, and using the expression builder, entered the following: = [Time total]![SumOfTime] Which is the result of the query. When the form is displayed, the box displays "#Name?" I have checked out "help" to no avail..Please help Thanks Dave |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PST file has reached maximum size | Jeff C | General Discussion | 2 | October 6th, 2005 01:35 PM |
How do I save an access document in word document? | cmartin | General Discussion | 2 | September 13th, 2005 11:26 PM |
Sort pages? | David | General Discussion | 15 | May 13th, 2005 11:33 PM |
Data in Subform Not Appearing | Susan L | Using Forms | 2 | November 1st, 2004 02:39 PM |
Recordset in subform based on field in parent form | Lyn | General Discussion | 15 | June 14th, 2004 03:10 PM |