Text field control source wont accept results of query

T

tbmarlie

In my report header, I am trying to use the results of a query in a
text box in the header. The table that I’m querying off of has only 1
record in it. So, I put the following in the Control Source of the
text box:

SELECT Tbl_A08_Company_Name_Q1.[Company Name] FROM
Tbl_A08_Company_Name_Q1;

But, then I get the following error message.

Syntax error (missing operator) in query expression ‘First([SELECT
Tbl_A08_Company_Name_Q1].[[Company Name] FROM
Tbl_A08_Company_Name_Q1;])’.

Thanks
 
A

Access Developer

A query is appropriate for a RecordSource but not appropriate for a Control
Source.

You could use a domain aggregate function such as DLookup, instead.

--
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access


In my report header, I am trying to use the results of a query in a
text box in the header. The table that I’m querying off of has only 1
record in it. So, I put the following in the Control Source of the
text box:

SELECT Tbl_A08_Company_Name_Q1.[Company Name] FROM
Tbl_A08_Company_Name_Q1;

But, then I get the following error message.

Syntax error (missing operator) in query expression ‘First([SELECT
Tbl_A08_Company_Name_Q1].[[Company Name] FROM
Tbl_A08_Company_Name_Q1;])’.

Thanks
 

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