Hi all.
I have a database in which each record has a corresponding MS Word file. I have the code to open Word, 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 expression 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 expression?
Thanks.
Rodney
I have a database in which each record has a corresponding MS Word file. I have the code to open Word, 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 expression 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 expression?
Thanks.
Rodney