Information générale
Catégorie:
Gestionnaire d'écran & Écrans
You have to think about what you want to do?
thisform.text3.Value=year(date())
inyearofbill=2000+VAL(LEFT(ALLTRIM(STR(thisform.text3.Value)),2))
? inyearofbill
i get 2020,but thisform.tet3.value=2005
Of course you get 2020 because of this LEFT(ALLTRIM(STR(thisform.text3.Value)),2), its taking the left 2 most characters of the year value. You need the right.
try this instead. inyearofbill=2000+VAL(RIGHT(ALLTRIM(STR(thisform.text3.Value)),2))
For the select what data types are these billno=thisform.text4.value and (billinfo.billdate)= inyearofbill these values.
This is a basic select statement, and the error indicates a data type mismatch. You should be able to work out what is wrong.
>hi,
>i print
>? inyearofbill&&i get 2020
>********************************
>thisform.text3.Value=year(date())
>inyearofbill=2000+VAL(LEFT(ALLTRIM(STR(thisform.text3.Value)),2))
> ? inyearofbill
>i get 2020,but thisform.tet3.value=2005
>
>i get another message&&Operator/operand type mismatch
> SELECT * from billinfo WHERE billno=thisform.text4.value and YEAR(billinfo.billdate)= inyearofbill INTO CURSOR curbilldata
>
>thanks.
>
>>Is the value of thisform.text3.Value already bound to a numeric field?
>>
>>inyearofbill=2000+VAL(LEFT(thisform.text3.Value,2))
>>
>>try this
>>
>>inyearofbill=2000+VAL(LEFT(ALLTRIM(STR(thisform.text3.Value)),2))
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement