Selasa, 02 Desember 2014

RE: [MS_AccessPros] call a function from my query

 

Remove the "dr1." from in front of the function name.  I would probably create a hidden text box on the form and set its control source to =dw1([pid from]).  then use the new text box in the query criteria.
 
Duane Hookom MVP
MS Access
 

To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Tue, 2 Dec 2014 19:37:33 -0800
Subject: [MS_AccessPros] call a function from my query



I need help with the following:
Table=DR1. The table has check boxes for every day of the week : sun, mon, tue, etc
Function=DW1.The function  accepts a date and returns the day of the week for that day eg 12/2/2014=tue


in my query I am trying to test if dr1.tue is true, so I am calling dw1 function with a date ([pid from] contains the date) as follows:
SELECT dr1.*
FROM dr1
WHERE dr1.dw1(Forms![zform1amb]![pid from])=True
ORDER BY dr1.[name];



this results in error message : undefined function dr1.dw1.


if I add '"&, I can run it in VBA, but I would like to run it as a query,


How can I get the DW1 function to work in the query?.


Sarah


__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar