Thank you very much!!! Will try that
----- Bogdan Zamfir wrote: ----
Hi
You need to create another table, called Document
This table will have the following fields
Doc_ID autonumber (primary key
Contact_ID long (foreign key, pointing to a contact record in Contact
table
Document nam
Document pat
.....(any other relevant fields, like keywords, etc
Then you can add a subform to your Contacts form, with documents for curren
contact
This subform will be based on Documents table, and related using Contact_I
to main form (Contacts form
On your main form you can add buttons to add a document, delete a documen
and view documen
For add document, you have to use a dialog to browser for a file, then add
new record to Documents table
To let user select a file, you can use API functions as shown a
http://www.mvps.org/access/api/api0001.htm that lets you use the standar
File dialog to get a filename from the user
To view the linked file, you should use the Shellexecute API call, a
followin
Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation
As String, ByVal lpFile As String, ByVal lpParameters
As String, ByVal lpDirectory As String, ByVal nShowCmd
As Long) As Lon
Global Const SW_SHOWNORMAL =
.....
ShellExecute(0, "open", your_field_which_store_pathname, "", "C:\"
SW_SHOWNORMAL
This call will open any document in default viewer, as registered in Window
Registry (so DOC will be open in Word, XLS in Excel, HTM in IE, PDF i
Acrobat Reader, etc
If you need more details / info, you can email me back
HT
Bogdan Zamfi
_______________________________
Independent consultan
jrs said:
I am new to creating databases so please excuse the possibly dum question
'contact management' template in Access 2003 is a good starting point.
have made a few small changes to fit the needs of our business. However,
would like to create a command button (or a better solution?) to link/vie
all the documents we have (99% word documents) that relate to tha
particular client. Can someone tell me how this can best be done?? Than
you very much