Format Date in Unbound Textbox

spacepro

Registered User.
Local time
Today, 21:36
Joined
Jan 13, 2003
Messages
714
Hi All,

I need to change the format of a date in a unbound textbox. I want to change it from dd/mm/yy to dd.mm.yy, simply changing the / to .

I used a input mask and set the format to dd.mm.yy but still returns the date has dd/mm/yy. Basically I am using the value from a calendar to open a excel file that is named after the date. For example today's file would be 18.01.05.xls.

If this can't be done can I strip the date into 3 unbound textboxes and then concatenate the values using code.

Any suggestions.

Many Thanks

Andy
 
Pat,

Thanks for the advice, however we have no control of the creation of the excel files as they are system generated from a third party contractor. Obviously the files could be renamed, but when the file is generated to the server , I want the user simply to click a button to set an OLE field to view the spreadsheet within Access.

So that we don't give the user access priviledges to the actual excel files, except for viewing from Access. Is there a way to change the format to my suggestion even though this goes again your logical thought process.

Thanks

Andy
 
Spacepro,

Look at the Replace function. You can use it before you append the ".xls"
to the filename.

Me.FileName = Replace(Me.FileName, "/", ".") & ".xls"

Wayne
 
Hi Wayne,

Hope you are keeping well. Thanks for the solution.
Worked a treat.

Take Care
Andy
 

Users who are viewing this thread

Back
Top Bottom