textbox value

Manos39

Registered User.
Local time
Yesterday, 17:24
Joined
Feb 14, 2011
Messages
248
Hello,
please help me on refrase this working ok sql from my form's listbox to same form's textbox value
(because the need of conditional
formating and more)

Code:
SELECT Count(hreomenoylikotbl.ylikoID) AS CountOfylikoID
FROM ylikatbl INNER JOIN hreomenoylikotbl ON ylikatbl.ylikoID = hreomenoylikotbl.ylikoID
WHERE (((IsNull([ypallilosID]))=False))
GROUP BY ylikatbl.eidosylikouID
HAVING (((ylikatbl.eidosylikouID)=[Forms]![ylikamainfrm]![eidosylikouID]));

Count of ylikoID is needed

So far trying my textbox gives 1 as value where should be more
Code:
=DCount("[ylikoID]";"[hreomenoylikotbl]";"[ypallilosID] Is Not Null And [ylikoID]= " & DLookUp("[ylikoID]";"[ylikatbl]";"[eidosylikouID]= " & [Forms]![ylikamainfrm]![eidosylikouID]))
 
you save your Query and name it (say qryCount)
then on the textbox:

=dlookup("CounOfylikoID","qryCount")
 
you save your Query and name it (say qryCount)
then on the textbox:

=dlookup("CounOfylikoID","qryCount")
Thanks arnelgp i ll give it a try...

Is there a way for avoiding saving a query and beacause my listbox is working,
to make that invisible and use the value with referencing that in my textbox? both are in same form
I think that makes it more simple
I was trying that before come with my question ..
 

Users who are viewing this thread

Back
Top Bottom