Trouble with DateDiff

R

RD

Hi all,

This ain't right. I'm just trying to get the number of days between an activity
begin date and it's end date. I've done it before, but this time Access keeps
asking me for a parameter (the field names). Every example I've looked at just
had the field names in the function. I've even qualified them with the table
name. Below is just the bit of SQL dealing with this:

TIA: DateDiff("d",[MR0093E].[ACT_BGN_DT],[MR0093E].[ACT_END_DT])

Anyone have any ideas why this causes Access to ask me for parameters?
ex. Enter Parameter Value MR0093E.ACT_BGN_DT

Near as I can tell it shouldn't be doing this.

Any help appreciated,
RD
 
D

Douglas J. Steele

Is table MR0093E included in the query? Have you possible mistyped either
the table or field name?
 
R

RD

Is table MR0093E included in the query? Have you possible mistyped either
the table or field name?

OW! My head! Your post got me thinking. MR0093E is an imported table. I
checked the field names and many of them have trailing spaces. Once I got rid
of those it worked fine. I need to alter my import routine to Trim the field
names. (Doh!)

Thanks for pointing me in the right direction.

Regards,
RD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top