Type mismatch
anonymous_at_discussions.microsoft.com
Date: 01/11/05
- Next message: Ken Snell [MVP]: "Re: Type mismatch"
- Previous message: WillRn: "Daunting Project . . . Help!"
- In reply to: Alain: "Type mismatch"
- Next in thread: Ken Snell [MVP]: "Re: Type mismatch"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 11 Jan 2005 07:11:22 -0800
hi,
guessing here but i think the problem is that your select
seem to be select 5 different dates and temp is declared
as A date. you may have to rewrite a little - have 5 temps
and 5 selects.
>-----Original Message-----
>Hi,
>
>I am trying to create a function that need to return a
date but getting the
>error 13 type mismatch in my select :
>
>Public Function ActivationDate(ActDateNotice As Date,
IdBranch As Integer)
>As Date
>Dim temp As Date
>
>temp = "SELECT
>MIN
(ExerDateNotice,ExerDateRenOption,ExerDateExpRights,ExerDat
eCanrights,ExerDatePurOption)FROM
>[General information] WHERE IdBranch = " & IdBranch
>
>ActivationDate = DateAdd("m", -12, temp)
>End Function
>
>>From my understanding, it is something that has to be
done with data type, I
>have tried different data type in the function even using
everything as
>Variant but still getting the same error. The fields in
the table are the
>correct type, date are short date and idbranch is a
autonumber
>
>Can anyone tell me what I am doing wrong
>
>Thanks
>
>Alain
>
>
>.
>
- Next message: Ken Snell [MVP]: "Re: Type mismatch"
- Previous message: WillRn: "Daunting Project . . . Help!"
- In reply to: Alain: "Type mismatch"
- Next in thread: Ken Snell [MVP]: "Re: Type mismatch"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|