Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing word Documents via Access Front end

Status
Not open for further replies.

llafretaw

MIS
Joined
Oct 2, 2001
Messages
64
Location
GB
Hi,
I was wondering whether it was possible to open up a word document through Access 97 form frontend when the document might be stored in a different directory. In addition the name of the document would change depending on the record selected but the title of the document would be equal to the record's name, so one would have to use a basic SQL statement. Basically I was wondering whether this was even possible?
Thanks.
 
Have a look at faq705-1971 (it's in the Microsoft: Access Modules (VBA Coding) thread FAQ's) which gives you a function that will allow you to open up any file, just by passing the file name.
For example you could put behind a button on your form:

fHandleFile("C:\WordDox\" & me!intID & ".doc",Win_Normal)

which would open up C:\WordDox\100.doc in word (assuming you are on record 100!)

I hope that gives you the basics.

Ben ----------------------------------
Ben O'Hara
bo104@westyorkshire.police.uk
----------------------------------
 
Hey, I've been using Hyperlink properties.. oharab you fhandle appears much simpler, do know the downsides/upsides of either way?
 
I've never used hyperlinks, I wasn't aware of their existence when I found fHandleFile, so have nothing to compare against.
With fHandleFile any file can be started, so long as its extension is registered as a filetype. If it doesn't know what to do with it, Windows itself asks you.
Not sure what happens with links.
Anyway, the moral with this is stick with what you feel works best. Access, like most programming is not an exact science. It is an art that few people appreciate! That is why I have not got a BSc in computer studies, but a BA in life! B-)

B ----------------------------------------
Ben O'Hara
Home: bpo@SickOfSpam.RobotParade.co.uk
Work: bo104@SickOfSpam.westyorkshire.pnn.police.uk
(in case you've not worked it out get rid of Sick Of Spam to mail me!)
Web: ----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top