run time error:'6' overflow

naina

Registered User.
Local time
Today, 04:44
Joined
Feb 28, 2010
Messages
19
Hi
I want to Filter ComboBox underlying value based on TxtBox Date value, that's why I'm trying to write this logic but
error shows: run time error: '6' overflow

Code:
Private Sub TxtTokenDate_AfterUpdate()
Dim iToken  As String

iToken = "Select  Token From HDC_BillparT" & _
"Where tokendate=" & Format$(Me.TxtTokenDate.Value, "mm/dd/yyyy")
Me.CboToken.RowSource = iToken
Me.CboToken.Requery
End Sub
next rewrite the Sql query in this way , New Error:"Invalid Sql Statement, Check the Server Filter on the forms record source"


Code:
iToken = "Select  Token From HDC_BillparT" & _
"Where  TokenDate =  CONVERT(DateTime, Me.TxtTokenDate, 102)"
Me.CboToken.RowSource = iToken
Me.CboToken.Requery
CboToken Record Source: SELECT RIGHT('00000' + CONVERT(Varchar(5), Token), 5) AS Token FROM HDC_BillParT

Forms Control:
Select * from HDC_BillparT , But fields are Unbound

Application:: A2003 ADP with Sql2000 srv


Any help would be highly appreciated.

<<<naina>>>
 

Users who are viewing this thread

Back
Top Bottom