Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2005, 11:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hi marcin2K,

Yes, the code as I originally posted it worked. It created several hyperlink filds in the target table. Why not got back and cut and paste the original code, changing only the directory values if you like. Let me know how you make out.

Bob

 
Old February 4th, 2005, 09:19 AM
Authorized User
 
Join Date: Jan 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Bob,

I have just used you code exactlly and only changed the paths and it all works :). Thanks a lot for your help. There is one thing I had to change that was the lines
           With rst
                .AddNew
                !FileHyperlink = strFileHyperLink
                .Update
                 blnRecordAdded = True
            End With

have to go in the if statement where it checks if its a pdf file, so that it doesn't repeat the same file when it saves it to a record. Everything else works perfect and it lets me open the hyperlink in the table afterwards so it must be a security issue for you.

THanks once again,

Marcin


 
Old February 4th, 2005, 09:25 AM
Authorized User
 
Join Date: Jan 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is a typo in my previous post, I meant I put those lines of code in the if statement where is checks if the date is within a certain range. Before you had it after this if statement and it needs to be inside it.

 
Old February 4th, 2005, 09:56 AM
Authorized User
 
Join Date: Jan 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

One last question, is there a way of refreshing the data in a table because with this if i want to make it open a different form after adding the data to the table and display all of its records it won't display anything. I have to open the first and then when I open the form it displays it. Its odd must be some access bug.

 
Old February 4th, 2005, 12:46 PM
Authorized User
 
Join Date: Jan 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok solved my problem, it seemed that it only happen when I had like 3 files in my folder. When I used like a 100 it worked with no problem. I also added a query to delete the old data maybe that solved it.

 
Old February 4th, 2005, 10:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Glad you got it all going :).

Bob






Similar Threads
Thread Thread Starter Forum Replies Last Post
MX 2004 - can't view remote files Modamz Dreamweaver (all versions) 2 January 11th, 2007 05:18 AM
how to use view state in code behind files in C# ajeshss C# 4 June 20th, 2006 06:00 AM
checking for recently added xml files fogofogo XML 0 February 13th, 2006 06:39 AM
View Files in a Directory echovue Access 1 October 15th, 2005 02:36 PM
Q. How do I upload files to a DB and view them? richard.york PHP FAQs 0 April 3rd, 2004 07:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.