Browse actual file vba (1 Viewer)

aman

Registered User.
Local time
Today, 08:09
Joined
Oct 16, 2008
Messages
1,250
Ridders, how can the file be linked to the network copy? Any suggestions /? Thanks
 

aman

Registered User.
Local time
Today, 08:09
Joined
Oct 16, 2008
Messages
1,250
Ridders, had a word with my boss and according to him we will be using a separate backend to store the import files so there is no limitation in regards to the max space in the database if we actually import files in it.

Can anyone please help me with importing files into database rather than linking ?

Thanks
 

isladogs

MVP / VIP
Local time
Today, 16:09
Joined
Jan 14, 2017
Messages
18,213
Just read your last two posts and am unclear whether you want to
1. Link to a network copy of the file
2. Import the file using the attachment field datatype

If its the first option, I'll upload some code you can adapt.
If its the second option, I will just repeat that I don't recommend it as it will cause your db to get much bigger, slow down and eventually reach 2GB limit

To set what I mean, add a couple of embedded images to a form e.g BMP files
Note the db size before and after doing this. Its likely that the increase will be more possibly much more than the size of the added images.
When he has time, I expect Doc Man will be able to explain why...

Now imagine importing multiple files .... bad news
 

aman

Registered User.
Local time
Today, 08:09
Joined
Oct 16, 2008
Messages
1,250
Thanks Ridders, that makes sense. Can you pls upload code to link to a network copy of the file ?
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 16:09
Joined
Jan 14, 2017
Messages
18,213
Will do so this evening UK time. Out all day


Sent from my iPhone using Tapatalk
 

isladogs

MVP / VIP
Local time
Today, 16:09
Joined
Jan 14, 2017
Messages
18,213
I already uploaded the code in post #7 of this thread:

https://www.access-programmers.co.uk/forums/showpost.php?p=1536601&postcount=7

The procedure is:
Private Sub fraLinkFile_AfterUpdate

Screenshot of that part of a form:


I have just edited the code in post 7 so hopefully you won't get any compile errors.
If you do get errors, define any additional variables used at the start of the code module

If a variable starts with 'str' its a string
e.g. Dim strFilePath As String

I have also added module code for 2 functions used in the frame code so with luck you now have all you need
 

Attachments

  • Capture.PNG
    Capture.PNG
    1.9 KB · Views: 93
Last edited:

Users who are viewing this thread

Top Bottom