Drawing/Document List

G

Guest

I am very new to access and apologise if i am asking a question which is
extremely basic and may have been answered 100 times beofre.

All I wan to do is create a document list with access. This will hopefully
list the filename of any documents in a specified folder, also the date
modified. Is it possible to link the file name to a a data base? It would
also be great if it could be linked to the title of the DWG drawing (found in
the title block of the drawing).

If anybody could guide me in the right direction id me really appreciative.

Regards,

MK
 
G

Guest

You need to give use more info.

What drawing software? I know that if it's autoCAD certain things can be
programmed. Give more info please.



You can link files to an access database without any issues. It is actually
very easy, but does require some coding. The best way to learn this one is
to get an example and the look at the code. Here are a few example. They
are all linking images, but the concept is exactly the same for drawing (or
any other type of file).

Take a look at
Explanation
http://www.mvps.org/access/forms/frm0030.htm

Remember, whatever you do...creating links is fine (this is proper
methodology), but embedding/importing the files a database is a horible idea
and leads to corruption/bloating.

Sample database to learn from
http://www.cardaconsultants.com/en/msaccess.php?lang=en&id=0000000007#images
http://www.cardaconsultants.com/en/msaccess.php?lang=en&id=0000000007#album
http://www.rogersaccesslibrary.com/download3.asp?SampleName=Pictures.mdb
http://www.rogersaccesslibrary.com/download3.asp?SampleName=PicturesLoad.mdb

Basically it gets summed up...
Use a standard open/save api to allow the user to select a file (for this
look at http://www.mvps.org/access/api/api0001.htm ) then store the full path
and filename in your table. Then you can simply use the
Application.FollowHyperlink "FullPathandFileName" to enable your user to open
the files when they double-click on them.



File lists are also easy. Sample code is provided below
*****
Function GetDirListing(strPath As String, Optional strFilter As String)
' Author: CARDA Consultants Inc, 2007-01-19
' Website: http:\\www.cardaconsultants.com
' License: You may use/alter this code as required as long as the Author,
Website & License comments remain.
' strPath = full path include trailing \ ie:"c:\windows\"
' strFilter = extension of files ie:"pdf". if you want to return
' a complete listing of all the files enter a value of
' "*" as the strFilter
Dim MyFile As String, MyFolder As String

MyFolder = strPath

'Add the trailing \ if it was omitted
If Right(MyFolder, 1) <> "\" Then MyFolder = MyFolder & "\"
'Modify the strFilter to include all files if omitted in the function
'call
If strFilter = "" Then strFilter = "*"

'Loop through all the files in the directory by using Dir$ function
MyFile = Dir$(MyFolder & "*." & strFilter)
Do While MyFile <> ""
Debug.Print MyFile
MyFile = Dir$
Loop

End Function
*******
--
Hope this helps,

Daniel P
 
G

Guest

Martin said:
I am very new to access and apologise if i am asking a question which is
extremely basic and may have been answered 100 times beofre.

All I wan to do is create a document list with access. This will hopefully
list the filename of any documents in a specified folder, also the date
modified. Is it possible to link the file name to a a data base? It would
also be great if it could be linked to the title of the DWG drawing (found in
the title block of the drawing).

If anybody could guide me in the right direction id me really appreciative.

Regards,

MK

Hi Daniel,

Thanks for the effort, you really know your stuff, unfortunately it realy is
all greek to me. I think i am going to have to start with something a bit
more basic, man all those arrows just freaked me out. I am really going to
have to start form the beginning, which am starting now.

Thanks once again for the effort, really appreciated. The info will
definitely not go to waste, in due course i will get to the leve where ill be
able to use it.
 

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