Text field control source wont accept results of query

  • Thread starter Thread starter tbmarlie
  • Start date Start date
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 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
 
Back
Top