Chat with a LIVE Microsoft Access Expert!
 
       
 

         

   

Go Back   Access World Forums > Microsoft Access Discussion > Macros

 
 
Chat with a LIVE Microsoft Access Expert!
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-19-2009, 03:41 AM
mgrygorczuk mgrygorczuk is offline
Registered User
 
Join Date: Feb 2008
Posts: 6
mgrygorczuk is on a distinguished road
upload a file, rename it and hyperlink-it

Dear All;

I'm putting a DB for stored documentation. Files are being stored on a server, my db will capture info about those files plus a hyperlink to them.

Now, whenever I add a new file, I have to give it a code number first. So my actions now are:

1. copy file to work folder (ToDB in my case)
2. input information into db about the file(like project number, doc type etc)
3. generate file number(based on selected: project no, stage, type - f.ex. 045-2-ANNX-sequencial no. (001, 002, etc)-I kind of done that by usind DefaultValue, but it doesn;t check for already existing no. in db so it gives a 001 by default to every file)
4. rename the file by adding generated no in front (so it keeps the original file name, just adds that generated no in front+space)
5. copy file name into db as file title(copy file's original name into text box on form)
6. move renamed file into server(delete from /ToDB, move to /DBFiles on server)
7. create a hyperlink to that file(which is done manually and takes too much time)

My question is:

Is there any way to automate this process?

Ideally, I'd click on a button "Add file", dialog box would pop-out asking for a file, I'd press
"OK" and the file would be moved to target folder, and updated with a number from db, also hyperlink to that file would be created and inserted into db.

Q1: Would I have to write a code for that from scratch or are there any buid-in "file add wizzards" ?

Q2: Could all and each of my steps be achieved using VB? Or is there a step that can't be done in Access at all?


I'm not an expert, and the last thing I want to do now is to try to find an answer to an impossible to solve problem. So. if anyone could just confirm that my steps mentioned above can be transformed into VB or macros and I could achieve the state in which I'm able to upload and rename a file by means of few simple clicks - then at least I'd know that it can be done and I'd go for a search for answers.

Any help greatly appreciated as I'm wasting too much time on creating hyperlinks from scratch everytime I add a file.

Regards,

Maciej
Reply With Quote
Sponsored Links
  #2  
Old 11-19-2009, 08:49 PM
HiTechCoach's Avatar
HiTechCoach HiTechCoach is offline
Problem Solver
 
Join Date: Mar 2006
Location: Oklahoma City, OK
Posts: 3,156
HiTechCoach is a jewel in the roughHiTechCoach is a jewel in the roughHiTechCoach is a jewel in the rough
Re: upload a file, rename it and hyperlink-it

A1: see: Document Links 2

A2: Everything you want to do can be automated with VBA. I use the File System Object (FSO) to move the fiel and rename it at the same time.
__________________
Boyd Trimmell, aka HiTechCoach
Microsoft Access MVP 2010
Started with Access 2.0. Now developing in Access 2010.
Business Process/Accounting/CRM Software Developer/Consultant
Programming: Nine different ways to do it right, a thousand ways to do it wrong.
Reply With Quote
  #3  
Old 11-20-2009, 10:31 AM
mgrygorczuk mgrygorczuk is offline
Registered User
 
Join Date: Feb 2008
Posts: 6
mgrygorczuk is on a distinguished road
Re: upload a file, rename it and hyperlink-it

Thanks, just what I needed! I still need to figure out where to put FSO in here - in attached Document Links 2 I'd need to rename and move file after I select it and press ok, it should then be renamed according to generated document number, that exists in the same record, and moved to other folder. Also original document name should be captured and stored in the same record - what should I use to do that? But anyway, the whole annoying process of creating hyperlinks is now avoided, and right about time - number of files in the folder on the server grew so big that it takes now 20-30s to even view the list of files in hyperlink's dialg window! Thanks again for fast and accurate response,

Maciej
Reply With Quote
  #4  
Old 11-25-2009, 10:10 PM
facklera facklera is offline
Registered User
 
Join Date: Nov 2009
Posts: 1
facklera is on a distinguished road
Re: upload a file, rename it and hyperlink-it

How can I hyperlink to another page within a blog? I want to make a blog about something, say credit. Is it possible to make a list of subtopics on the side of the main page with links to their respective pages. For example, one subtopic might be "how your credit score changes" on the list to the side of the main page. How do I create a hyperlink on those words that leads to a page within the blog on that topic?
___________________
keyword research ~ keyword tool ~ keyword tracking ~ affiliate elite

Last edited by facklera; 12-01-2009 at 12:09 AM..
Reply With Quote
  #5  
Old 11-26-2009, 07:08 AM
HiTechCoach's Avatar
HiTechCoach HiTechCoach is offline
Problem Solver
 
Join Date: Mar 2006
Location: Oklahoma City, OK
Posts: 3,156
HiTechCoach is a jewel in the roughHiTechCoach is a jewel in the roughHiTechCoach is a jewel in the rough
Re: upload a file, rename it and hyperlink-it

Quote:
Originally Posted by facklera View Post
How can I hyperlink to another page within a blog? I want to make a blog about something, say credit. Is it possible to make a list of subtopics on the side of the main page with links to their respective pages. For example, one subtopic might be "how your credit score changes" on the list to the side of the main page. How do I create a hyperlink on those words that leads to a page within the blog on that topic?
facklera,
You will probably need to check with the support for the blogging software you are using to see if it is possible to do. How is Microsoft Access used with your blog?

Note: This is an Access database support forum.

TIP: Please start a new thread. Posting an unrelated question to another members post is considered "hijacking".
__________________
Boyd Trimmell, aka HiTechCoach
Microsoft Access MVP 2010
Started with Access 2.0. Now developing in Access 2010.
Business Process/Accounting/CRM Software Developer/Consultant
Programming: Nine different ways to do it right, a thousand ways to do it wrong.

Last edited by HiTechCoach; 12-01-2009 at 05:22 PM..
Reply With Quote
Sponsored Links
Reply

Tags
auto, file, folder, hyperlink, rename

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:35 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(c) copyright 2009 Access World