calculated field on form #Name? error

G

Guest

I have two fields on a form: training date and review date. The review date
is 6 months after the training date and I have created a query that
calculates this.

when I link the text box 'review date' with the query field that contains
the calculated date, the form shows #Name?

the form field data control source has the following in it:
=[QRY_ReviewDate]![Review1]

Would appreciate any suggestions.
 
F

fredg

I have two fields on a form: training date and review date. The review date
is 6 months after the training date and I have created a query that
calculates this.

when I link the text box 'review date' with the query field that contains
the calculated date, the form shows #Name?

the form field data control source has the following in it:
=[QRY_ReviewDate]![Review1]

Would appreciate any suggestions.

1) If the query is NOT the FORM's recordsource, use (in an UNBOUND
control):
=DLookUp("[Review]","QRY_ReviewDate")

The above assumes the query returns only one record.
The name of this control can NOT be "Review".

2) Why do you need a query to return a date 6 months after the
entered training date?
Just use an unbound text control.
Set it's control source to:
=DateAdd("m",6,[Training Date])
 
G

Guest

I used a query because I am not the genius that you quite obviously are!!!

Thank you so much for your elegant solution; not only does it solve my
problem neatly, it reminds me that the simple answer is the best one!

Many many thanks

fredg said:
I have two fields on a form: training date and review date. The review date
is 6 months after the training date and I have created a query that
calculates this.

when I link the text box 'review date' with the query field that contains
the calculated date, the form shows #Name?

the form field data control source has the following in it:
=[QRY_ReviewDate]![Review1]

Would appreciate any suggestions.

1) If the query is NOT the FORM's recordsource, use (in an UNBOUND
control):
=DLookUp("[Review]","QRY_ReviewDate")

The above assumes the query returns only one record.
The name of this control can NOT be "Review".

2) Why do you need a query to return a date 6 months after the
entered training date?
Just use an unbound text control.
Set it's control source to:
=DateAdd("m",6,[Training Date])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top