Forms :: Relative Folder On Image Path

Jul 10, 2013

I am trying to link an images (.png) onto a form. I have a folder of all the images I want but I want the path to be relative. So that if I move the access file and the images folder to a new location, it will still work.

In the properties for the image, It works fine as C:UsersjohnDesktopimage1.png but what I am looking for is the ability to use "imagesimage1.png" as the file will always be in that relative folder to the db.

What is the correct syntax for this? putting image1.png in the same directory and just using image1.png works, but this won't be very tidy with 100+ images.

I have tried:

imagesimage1.png
imagesimage1.png
imagesimage1.png

With PictureType set as linked.

I know from searching it is possible through VBA by getting the root directory of the folder and appending the filename. Don't really want to go this root. I also don't particularly want to create a table to store the images or links.

View Replies


ADVERTISEMENT

Forms :: Adding Image Path For Web

Oct 19, 2013

I have in a form this code but i need to add image path for HTML to export the FinalTable to Web "HTML" format

Specially my point in

Code:
rstInsert(RTrim(rst![Attacking])) = "<img src=Attack.png>"

The full code is :-

Code:
Option Compare Database
Private Sub CreateCrosstab_Click()
Dim dbs As dao.Database, rst As Recordset, rstInsert As dao.Recordset
Set dbs = CurrentDb
Call DeleteTable("FinalTable")

[Code] .....

View 1 Replies View Related

Forms :: Click On A Image Opens A Folder

Jul 13, 2014

how can i make a folder from my windows 7 opens when i click on a image?

View 11 Replies View Related

Modules & VBA :: Changing Image Path - Set Picture Property Of Image

Dec 4, 2014

I have a form that I would like to update a picture on using VBA. The source of the picture path is in part a query that is not bound to the form. So far I have the following code that is pretty much working, but with a couple flaws.

Code:
Private Sub Form_Current()
LoadDefaultPicture
End Sub
Sub LoadDefaultPicture()
Dim db As DAO.Database

[Code] ....

This is working. However, when I change the record the picture flashes the current picture once and then loads the new picture. It is like it reloads the current picture then loads the new one. I'm hoping there is a way to get rid of the flash.

Also, the code fails here:
strDefaultPictureName = rs.Fields("AttachmentName")

When the query does not return a record. I can definitely fix this by adding an if statement to check for a record, but I'm kind of perplexed at why it is failing at that line. I would expect it to assign an empty string to that variable name and then fail on the next command where I try and set the ".Picture" property of the image.

View 8 Replies View Related

How To Do A "relative" Image Link To Save Space.

Sep 5, 2005

I have a database that I migrate to different locations as we change stations (military). I keep the master on my C: drive and then put a copy onto the shared network drive. I keep my images in a subfolder of the master db.

example:

C:Pirate (master db)
C:Piratedbfiles (where I store the images)

I have the images "linked" on the forms to the subfolder "dbfiles" that is on the shared drive. However, as we change locations the drive letter changes for the shared drive. I want to make a "relative" link to the pictures in the properties box as so:

Piratedbfilesimage1.jpg
or
dbfilesimage1.jpg

However, it keeps putting the C: in front of the text or else it won't find the images. I desire it to look in the subfolder of the active db (whether or not it is on the LAN or hard drive).

I know I can embed the images, but that exponentially increases the size of the db. I've played around with putting them in a table, but couldn't make that work either.

Oh, Access 2000.

Thanks,
Brian

View 1 Replies View Related

Current Folder/path

Jun 11, 2006

Hi all

How can I change the output string in the command below to simply save the document to the same folder that the DB resides??

DoCmd.OutputTo acQuery, "qryAwardsExportWord", "RichTextFormat(*.rtf)", "C:dataawards.doc", True, "", 0

any help is appreciated

View 2 Replies View Related

Folder Path To Variable

Feb 28, 2007

I have a form set up and I am looking to:

Set up a txtbox that will house a variable (no worries)

I want a button that when clicked to open a "MS Windows window" that allows the user to navigate to a folder. When done I need that path to be placed in the textbox I set up (Or to a variable)

Does that make sense?

I thank you all for your help it is very appreciated.

Thanks Again

View 4 Replies View Related

Modules & VBA :: Adding Path Of Folder In Email

Jan 29, 2015

I have some code that takes data from my database and creates an email with it. It also creates a folder and a word document. In the email, I would also like to include the file path as a link instead of just the path that it puts there now. Is this possible to do?

Code:

Option Compare Database
Private Sub SendEmail_Click()
On Error GoTo Err_open_word_Click

Dim oApp As Object
Dim path As String

[Code] .....

View 1 Replies View Related

Path Of An Image

Aug 22, 2007

Hi

I have a table with this fildes:
name - family - PathImage

I have 400 records.
and I have 400 pictures for 400 person to a folder

and I want fill them, but is an easy methode for finding and filling pathImage for each person? and insert it to table cell?

I want insert Name of image file to PathImage filde.
Is there any thing such browse bottom to find file name?


Thank for your lead

View 5 Replies View Related

Modules & VBA :: Loop Through Folder - File Path Hyperlink

Nov 19, 2013

I am using MS Access 2010. I have a code that I am using that loops through a folder gather all the names of the files in the folder and inserts them into a table (shown below). The table is named "tblFiles" there are two columns in the table titled file name and file path. What I want to do is to also loop through the same folder to find the file path of the files and insert them into the file path column has a hyperlink where users can just click on the hyperlink and the file opens.

Private Sub Form_Load()
Dim fs, f, f1, fc, s
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("tblFiles")

[Code] .....

View 4 Replies View Related

Insert Image Path

Dec 17, 2006

i have database with products and i want to add a picture for each one
In the table of products i have a field "Image path"
D:dun.jpeg
how can i insert this text-path from the form and not manually from table?
for example :with a button ADD IMAGE from the form and browse file.......

View 2 Replies View Related

Modules & VBA :: Universal Short File Path To Documents Folder?

May 27, 2014

I have the code below and I want it to open a file from my documents folder. The only problem is that every computers path is different to this folder. Any easy way to work around and open a file in My Documents without the full path?

I want to eliminate the part of the path in red and make it universal because computers will have a different number.

Operating System: Windows 7

Code below:

Public Function AddITARPicOffloadAnalysis()
Dim xlApp As Object
Set xlApp = CreateObject("Excel.Application")
With xlApp
Dim wb As Object
Dim ws As Object
Dim Lastrow As Long

[Code] .....

View 9 Replies View Related

Linked Image Path Change Doesn't Work?

Mar 18, 2008

Hello. I've searched and read a few threads concerning image controls on forms and haven't been able to find a solution to my problem (yet). Anyway, I have a form with two image controls (imgOK1 & imgOK2). The previous and current setting of the "Picture" property for both images is set to "C:MOMGraphicsfilename.bmp". The location of my images has changed and will change for each user which is "C:Documents and Settingsuser.nameMOMGraphicsfilename.bmp". I'm using the following code to set the .Picture property on form load:

Dim ImgPath
ImgPath = "C:Documents and Settings" & Environ("username") & "My DocumentsMOMGraphics"
Me.imgOK1.Picture = ImgPath & "imgButton-OK1_25%.bmp"
Me.imgOK2.Picture = ImgPath & "imgButton-OK2_25%.bmp"

When the form is opened, an error stating that the image located at "C:MOMGraphicsfilename.bmp" cannot be found; once for each image control. Then the form loads and .Picture properties appear to be set correctly as they are displayed fine. I've tried to clear the .Picture properties for both image controls using the properties editor but the original path returns as soon as the property loses focus. Is there a way to programatically set this property and make it stick so the errors are not displayed?

View 7 Replies View Related

A Better Mouse Trap And Saving Image Path Problems

Sep 22, 2006

I'm using GHudson's A Better Mouse Trap code. It works great. However, I added other code from http://www.databasedev.co.uk/image-form.html to get and save the path to image files and now I think there is a conflict between the sets of code.

The Images tab on the form frm_CreateNewSpec is where I have problems. The error messages are definitely from Mouse Trap...I just don't know how to resolve the problem.

I've probably missed something simple, but don't know what.

Any and all assistance is greatly appreciated by this novice.

Randy

View 2 Replies View Related

Modules & VBA :: Display Random Image From Folder (Not Embedded)

Jun 26, 2013

I'm working on a database for my holiday pictures. The pictures are organized in folders per trip/date/location.

When viewing the data of a particular trip, I want the form to display a random image from the respective folder (path stored in database).

I already found a function to count the files in the folder:

Code:
Function GetFileCount(folderspec As String) As Integer
' Returns a count of files in folderspec, or -1 if folder does not exist
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(folderspec) Then
GetFileCount = fso.GetFolder(folderspec).Files.Count
Else
GetFileCount = -1
End If
End Function

to plug into a "randomizer":

Code:
lngFileCount = GetFileCount(strFOLDER)
Randomize
intRND = 1 + Int(lngFileCount * Rnd())
MsgBox intRND

The thing I can't find is how to reference this nth file (or even if there is a way to directly reference this file).

Is there, or do I have to use some kind of looping?

View 3 Replies View Related

Modules & VBA :: Display Image On A Report Based On Path Saved To Each Record

Jul 25, 2013

I have a piece of code that I'm using to display an image on a report based on a path saved to each record. the code is:

Code:
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.ImagePath) Then
Me.ImgPic.Picture = "O:BellinghamIntranetProductionLabelsNo Label.bmp"
Else
Me.ImgPic.Picture = Me.ImagePath
End If
End Sub

It seems like every few months the code crashes access and then never works again. When I debug, the part that is highlighted is:

Code:
Me.ImgPic.Picture = Me.ImagePath

The only way i've found to correct it is to delete the report and the module and copy them back in from a backup database. What could be causing this code to crash or how to stabalize my database to prevent this from happening again.

View 14 Replies View Related

Get "folder Path" From "file Path"

Jul 29, 2005

After some help from one of the threads here I managed to install a Browse button in a form that inserts a file path to a text box. What I need is the folder path from that file path in another text box. For example if the file path is
C:Documents and SettingsmixupSketchesowl.jpg

I would like to get either
C:Documents and SettingsmixupSketches
Or,
C:Documents and SettingsmixupSketches
in my second text box.

I do not have much experience with Access; therefore please give a little detail on how to accomplish this.

Thanks.

View 9 Replies View Related

Relative Links For Linked Tables

Jan 6, 2006

Hi,

I'm buliding an access system in which the forms and tables stored in seperate databases as such:

forms: \serverdirmyDatabase.mdb
tables: \serverdirdatamyTables.mdb

myDatabase has a load of linked tables from myTables. Problem; my network drives are mapped differently from the users, so the links do not work for me.

So - does anyone know how I can set up a relative link, so myDatabase looks for datamyTables? i.e. it looks from the source directory rather than checking the whole path back to the root?

Hope this is making sense . . .

Dave

View 2 Replies View Related

General :: Identifying List Of Each Object With Their Relative Size?

May 19, 2015

I have a large database. I want to identify which objects take up the most space. Any way of identifying a list of each object with their relative size?

I can do this in sql server, but no in Access?

View 8 Replies View Related

How To Open A Dialog Box To Move Files Inside A Folder That Is Setup As Current Folder

Sep 2, 2015

I'm trying to automate a process of selecting a set of file/s and move them in a folder. When I click on a button, it should open a current folder that is setup in the code.

Lets say that I have a folder C:documents est, and very time I click on the button, it should open the dialog box with that path so I can select the files from another folder, drag them there and they will be saved in that folder.

This will form part of wider automation that will send an email stating that those file/s where placed in that folder.

I have in the same form where the button is placed, 3 check boxes that needs to be passed to the email as well that one or all the files where placed in the folder.

View 10 Replies View Related

Save Reports To Defined Path In Path Field

May 26, 2014

Till now I managed to publish and save all in C:Reports. What I'm trying to do is Save to path specified in Path. DB attached.

Private Sub PrintAll_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim MyPath As String
Dim MyFileName As String

[Code] ....

View 6 Replies View Related

Modules & VBA :: Open Folder Nested Inside Main Folder?

Mar 16, 2015

I'm trying to open a folder based on a BIN nr. This folder could be in a main folder that has diferent subfolder. As there where differnt naming used to create the folderes, one of the things they have always is the BIN nr. It alwasy start with a unique number and maybe I could use it to scan the subfolders and open that one that the BIN nr is equal as in the field BIN.

Now we have serveral 1000th of folders and finding them takes time.

View 3 Replies View Related

Forms :: Path Not Found - When Passing Arg Value

Aug 22, 2014

The code is a mix of someone else's and mine. Essentially the form is like a document library, based on the parameters in the form, it takes the original document that is selected by the user, then copies the file over to a central repository. When I don't pass a value over from another form using the following:

Me!AssociatedFeedback = Me.OpenArgs

Then everything works fine. Doesn't matter where I put this line of code (form open, after update, etc.) I get an MS Access error that says "Path Not Found" when you execute the "cmdSave" button.

Code:
Option Compare Database
Option Explicit
Dim strFilePathFrom As String
Dim strFileFrom As String
Dim strFilePathTo As String
Dim strFileTo As String
Dim strFileDeskTop As String

[code]....

View 11 Replies View Related

Forms :: Automatic Folder Creation

May 23, 2013

I currently have a database where users input new parts into a database using a part form. When they put in the part type, a tracking number is automatically generated. I would like a folder to be created for each part where we can store pictures and a report. How would i have it create a report to a certain area using the tracking number as the folder name? I also want to be able to upload pictures and eventually save the report in there but creating the folder is the first step.

View 7 Replies View Related

Forms :: SendObject Email Not In Sent Folder

Jun 2, 2013

I am sending an email using SendObject, like this:

DoCmd.SendObject acSendNoObject, , , eMailAddress, ccAddress, , Me.Subject, Me.MessageBody, 0

The email is sent correctly. However, in Access 2003 a copy was posted to the Outlook 'Sent' folder. Since we have moved to Outlook 2010, a copy is no longer posted to the 'Sent' folder. We miss having that copy.

Is there an option that I can set to post the email to the user's 'Sent' folder? If not, what about a BCC? How can I get the user's email address?

View 3 Replies View Related

Forms :: Opening A Folder From A Form

Mar 14, 2013

I have a folder called site docs on our server m:/estates/sitedocs...I want to have a button that opens this folder but in the correct site sub folder

Ie:- primary Key on form site number 0001S if i click site docs button i want it to open folder in estates.sitedocs/0001S or which ever site number form i am in for that site number

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved