Solved DateAdd Function acting weird.

Jurie

New member
Local time
Today, 08:13
Joined
Jan 8, 2025
Messages
4
Good Day.
I am working on a client's app on a Windows Server 2022 Standard and Ms Access Professional Plus 2019 installed.

Here is the weird part...
When I use the dateadd function in the query editor...
IN DESIGN VIEW: dateadd("m",1,Fieldname) it returns a syntax error.
However if I type the same dateadd function is SQL VIEW... the query runs correct.

(You can save the query, but the moment you try and edit the dateadd function in design view, you get the same error again).
I include the references I am currently using.

Does anybody know how to fix this?
 

Attachments

  • ReferencesUsed.jpg
    ReferencesUsed.jpg
    53 KB · Views: 13
This could depend on the list separator ... ; vs ,
Try in design view: dateadd("m";1;Fieldname)
 
Hi Josef
No, that was the first thing I tested... same error
 
Does this only happen in the query or does it also happen in the immediate window (press Ctrl+G)? Does your code compile?
 
Good Day.
I am working on a client's app on a Windows Server 2022 Standard and Ms Access Professional Plus 2019 installed.

Here is the weird part...
When I use the dateadd function in the query editor...
IN DESIGN VIEW: dateadd("m",1,Fieldname) it returns a syntax error.
However if I type the same dateadd function is SQL VIEW... the query runs correct.

(You can save the query, but the moment you try and edit the dateadd function in design view, you get the same error again).
I include the references I am currently using.

Does anybody know how to fix this?
Show us, please, the a screenshot of the Design View of that query. Also show us, please, the SQL from SQL view. Maybe someone can spot a subtle difference.
 
Hi George.
No Zero difference in code :) ... only thing that makes sense is a corrupt dll.
After repairing office its now running.
Thank you for the input.
 
Does this only happen in the query or does it also happen in the immediate window (press Ctrl+G)? Does your code compile?
Thank you ... yes code compiles.
like I just mentioned to George...
... only thing that makes sense is a corrupt dll.
After repairing office its now running.
Thank you for the input.
 
Hi George.
No Zero difference in code :) ... only thing that makes sense is a corrupt dll.
After repairing office its now running.
Thank you for the input.
Glad to hear you resolved the problem.

Continued success with the project.
 

Users who are viewing this thread

Back
Top Bottom