Using MS Access/Date

Advertisement


Question
QUESTION: this is my last attempt, sorry to bother you but i followed your instructions and I am getting a complie error and it has the DateDiff function highlighted

ANSWER: What did the error say and what was the exact line highlighted.

Please don't give up on this, its not complex, but there may be small issues that cause an error. But I tested the code I gave you. I know it works, so there may just be some small piece you are missing.

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

---------- FOLLOW-UP ----------

Second Screen after compile message error
Second Screen after co  
QUESTION: It refuses to work correctly in my database.  while working in the practice one I made it worked exactly like you said it would, but when I put it in the real one it says complie error expected variable or procedure, it highlights the line
Public Function ElapsedTime(dteStart As Date, dteEnd As Date) As String
in yellow and high lights the first DateDif in blue, also it wont let me leave the upper right drop down on declarations it keeps changing to elaspedtime. So if you know what this issue is id love the help

Answer
Again, you need to show me exactly what you are seeing. What is the DateDiff lines that's highlighted? Are you sure that you are spelling things correctly and that the datatypes are correct?

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

©2012 About.com, a part of The New York Times Company. All rights reserved.