tags:

views:

32

answers:

1

Hi

When executing the code , Datatype mismatch Error is showing .Can tell if i need only Month(either as January,February.. or as 1 ,2,...12) as a field in MS Access database what should i give as data type.

Thanks for your answer.One more query:

if (rs6("TotalDays")+ tdays) > rs5("Sing") then

Is there any syntax error in this statement..?

tdays holds the number.

+1  A: 

Month() in access takes a parameter of type DateTime and returns the number of the month. To get the month name, you could either do FormatDate(Month(yourDate), 'mmmm') or MontName(yourDate) (in Access 2000 and later).

See here for more info.

Tomas Lycken