[AccessD] Function with Operators and Conditions

Charlotte Foust charlotte.foust at gmail.com
Wed Oct 6 10:07:58 CDT 2010


MyDate has to be a field in the query and you don't do it like that.
The expression is telling the query engine to compare the field MyDate
to the result of the function FindMyDate(StartDate).  Where are you
trying to do this?  Me!StartDate suggests you're doing something in a
form.  You can't just hash them together like that.  If you're doing
it in a query the suggestion I made originally should work.  If you're
doing it in code, post the code because it won't work the same way.

Charlotte Foust

On Wed, Oct 6, 2010 at 7:13 AM, Tony Septav <iggy at nanaimo.ark.com> wrote:
> Hey Charlotte
> Thanks
> But if I try to put an operator in the function
> ie. MyDate="<#" & Me!StartDate & "#"
> FndMyDate=MyDate
> And put FndMyDate() in the Query Grid
> I get the error message "Data type mismatch in criteria expression"
> No biggy I just used sqls for the list boxes rowsource.
>
> Charlotte Foust wrote:
>
>>You can put the function in the expression cell (i.e., Expr1:
>>[MyDate]= FindMyDate(= Date variable) and then put True in the
>>criteria cell.
>>
>>Charlotte Foust
>>
>>On Tue, Oct 5, 2010 at 8:26 AM, Tony Septav <iggy at nanaimo.ark.com> wrote:
>>
>>
>>>Hey All
>>>Is it possible to embed an operator or condition in a function that is
>>>used as criteria in the query grid.
>>>I am sure I have solved this problem before, blame it on old age.
>>>What I want to do is change the criteria on the fly.
>>>Equal to   FndMyDate(=  Date variable)
>>>Less Than FndMyDate(<Date variable)
>>>Show all    FndMyDate(Like *)
>>>--
>>>AccessD mailing list
>>>AccessD at databaseadvisors.com
>>>http://databaseadvisors.com/mailman/listinfo/accessd
>>>Website: http://www.databaseadvisors.com
>>>
>>>
>>>
>>
>>
>>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>




More information about the AccessD mailing list