calculated field syntax problems?

cyraxote

Registered User.
Local time
Yesterday, 23:53
Joined
Sep 19, 2002
Messages
20
Hi all.

I have a database in which each record has a corresponding MS Word file. I want to create a calculated field in a query that contains the filename with full path. Then, a button on a form to open the Word file associated with the record. I have the second part under control, but I'm having trouble creating a pathname from the separate bits of data that have to be strung together.

What I have so far is:

Path: Left([Dockets].[Month],3) & "\" & [Dockets].[Journal] & (Date([Dockets].[Month])) & [qry_MOL_Feb_2003].[LogicID] & ".doc"

where [Dockets].[Month] contains the full text month name, [Dockets].[Journal] contains a 3-letter text entry, and [qry_MOL_Feb_2003].[LogicID] contains a 4-digit numerical ID. Each word file is in a directory with a 3-letter month nam named JJJMLLLL.doc; JJJ is the the journal code, M is the month number (Oct-Jan are all = "1"), and LLLL is the LogicID.

What I want is text (such as):

Feb\MOL21234.doc

The path before the month name is static.

I can't seem to master the syntax necessary for this calculated field to function---keep getting error messages. Does anyone see anything glaringly obvious that I've overlooked? Am I using Date() incorrectly? Is there a month(date) function?

I'm trying to add this as a field in the qry_MOL_Feb_2003 query. Perhaps a separate query containing just this field?

Thanks.

Rodney
 
Pat was nice enough to give you a reply on your original post.
 

Users who are viewing this thread

Back
Top Bottom