Format Date bug ??

  • Thread starter Thread starter ianc
  • Start date Start date
I

ianc

I'm using Access 2007 and appear to have a discovered a bug can anyone shed
any light?

I have a form with a datasource and have a simple piece of code that formats
a date to give me the week number of the current week:

format(Date, "ww", 2)

When I run the code I get an error message 13 Type Mismatch. The value is
not assigned to a field and the message even appears when I display the
result in a message box. However when I remove the data source for the form
the error disappears and the correct value is displayed.

Thanks in advance

Ian
 
2 minutes later and solved my own problem. It occurred to me that I might
have a reserved word as a field name in the data source and bingo I've called
one of the fields in the datasource "format" duh.

Helps to talk though!
 
ianc said:
I'm using Access 2007 and appear to have a discovered a bug can anyone
shed
any light?

I have a form with a datasource and have a simple piece of code that
formats
a date to give me the week number of the current week:

format(Date, "ww", 2)

When I run the code I get an error message 13 Type Mismatch. The value is
not assigned to a field and the message even appears when I display the
result in a message box. However when I remove the data source for the
form
the error disappears and the correct value is displayed.

Thanks in advance

Ian

This is a guess: Sounds like you have a field called 'Date' in the
recordsource. If so, change the name to eg OrderDate.
 
Back
Top