newbie question Control Source

Arrowx7

Registered User.
Local time
Today, 04:03
Joined
Feb 1, 2005
Messages
19
hello,
I made a text box and I am trying to assign an SQL query to it.

I tried putting this in the "control source"
=(SELECT 4)
But it keeps telling me #Name?
It's driving me completely instane!!! why can't I do an SQL query in the control source??


Please save the hair on my head and help me. :)

Thanks in advance!
 
You can't, use DLookup on a query. There's probably a better way if you give some more details somebody will help
 
alright, I have some values in a table, and I want to count them up. I thought I could do a text field that looks up a query something like SELECT count(*) from myTable Where title=[textfield1];

textfield1 is another text field on the same form. I thought that it'll take the value in the text field (that is bound to some field in one of the tables), and insert it into the WHERE clause and return me a number. Apparently you can't do SQL in the Control Source property. How else can we do it?


Thanks in advance guys!
 
use the Dcount() function in the controll source. Check help for syntax

HTH

Peter
 

Users who are viewing this thread

Back
Top Bottom