473,698 Members | 2,943 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help please! Linking, showing, but not embedding images

Hello all.

I hope someone can help me here. I need to make a db on many pictures,
however, if I OLE them, the access database grows hugely. If I only
hyperlink them, I can't view them. is there a way how I can hyperlink
the pictures and have something like thumbnails to view them in a form?
any comment apprecciated. thanks

Nov 13 '05 #1
6 1990
Use an Image control to view the picture and store a Text item in the table
called E.G "PhotoPath" which is the path to the picture
something like "C:\My Documents\MyPho tos\Photo1.jpg"

You then need a bit of code on the OnCurrent event of the form like
Me!Photo.Pictur e = Me!PhotoPath

You will need to do check whether the photo exists
If Dir(PhotoPath) = "" Then ' not found
....
End if

You may also get annoyed with a message box temporarily appearing saying
something about JPEG Image loading

Have a look at the registry (Windows XP) and find
HKEY_LOCAL_MACH INE\Software\Mi crosoft\ Shared Tools\Graphics
Filters\Import\ JPEG\Options Yes
Change the Yes to a No to stop this.

There are routines to do this automatically on opening the form

HTH

Phil

<th***********@ gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Hello all.

I hope someone can help me here. I need to make a db on many pictures,
however, if I OLE them, the access database grows hugely. If I only
hyperlink them, I can't view them. is there a way how I can hyperlink
the pictures and have something like thumbnails to view them in a form?
any comment apprecciated. thanks

Nov 13 '05 #2
Use an ImageFrame on the form, store images in a folder, and use the
following code:

Private Sub Form_Current()

' Display the picture for the current employee record if the image
' exists. If the file name no longer exists or the file name was blank
' for the current employee, set the errormsg label caption to the
' appropriate message.

Dim res As Boolean
Dim fName As String

Path = CurrentProject. Path & "\Employee Photos"
On Error Resume Next
errormsg.Visibl e = False
If Not IsNull(Me!Photo ) Then
res = IsRelative(Me!P hoto)
fName = Me![ImagePath]
If (res = True) Then
fName = Path & "\" & fName
End If

Me![ImageFrame].Picture = fName
showImageFrame
Me.PaintPalette = Me![ImageFrame].ObjectPalette
If (Me![ImageFrame].Picture <> fName) Then
hideImageFrame
errormsg.Captio n = "Picture not found"
errormsg.Visibl e = True
End If
Else
hideImageFrame
errormsg.Captio n = "Click Add/Change to" & vbCrLf & " insert
Employee's photo"
errormsg.Visibl e = True
End If

Me.lblDisplayLa stName.Caption = Me.LastName
Me.lblDisplayFi rstName.Caption = Me.FirstName
End Sub
--

Tony D'Ambra
Web Site: aadconsulting.c om
Web Blog: accessextra.net

<th***********@ gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Hello all.

I hope someone can help me here. I need to make a db on many pictures,
however, if I OLE them, the access database grows hugely. If I only
hyperlink them, I can't view them. is there a way how I can hyperlink
the pictures and have something like thumbnails to view them in a form?
any comment apprecciated. thanks

Nov 13 '05 #3
hey, thanks

I tried it. unfortunately, I get the message that the OnCurrent
procedure produced an 'invalid outside procedure' - what am I doing
wrong? my VB isn't very good, sorry. also I'm using access 97.

Theo

Nov 13 '05 #4
hello,
thanks for the code. however, access complains about

"CurrentProject " highlighted - 'variable not defined'

any ideas? I am sorry, I am not very good with VB, also my version of
access is '97.
thanks a lot.
Theo

Nov 13 '05 #5
Try this

Function FindOldPhoto(fr m As Form, PhotoPath As String, ID As Long)

'HKEY_LOCAL_MAC HINE\Software\M icrosoft\ Shared Tools\Graphics
Filters\Import\ JPEG\Options ShowProgressDia log No

Dim Msg As String, FilterName As String

If Nz(ID) = 0 Or Nz(PhotoPath) = "" Then
frm!Photo.Pictu re = ""
Exit Function
End If

If Dir(PhotoPath) = "" Then ' not found
Msg = "Photo: " & PhotoPath & vbCrLf
Msg = Msg & "is not found at the above location (or is misspelled)"
MsgBox Msg, vbInformation, "Missing Photo"
frm.Photo.Pictu re = ""
Exit Function
End If

frm!Photo.Pictu re = frm!PhotoPath

End Function

Private Sub Form_Current()

Call FindOldPhoto(Me , Nz(PhotoPath), ID) ' Load Photo

End Sub

When you say your VB is not too good, does that mean you have some or no
experience with Events.

Phil

<th***********@ gmail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
hello,
thanks for the code. however, access complains about

"CurrentProject " highlighted - 'variable not defined'

any ideas? I am sorry, I am not very good with VB, also my version of
access is '97.
thanks a lot.
Theo

Nov 13 '05 #6
hello-
sorry, been away. I've had some experience with VB, a little with
events, but that was years ago at school. however, I've found another
solution which I should've looked into before anyway, and downloaded a
program called picasa, which I found is quite sufficient (and which I
can highly recommend!). sorry to have bothered you all.
happy new year and a belated merry xmas!
Theo

Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3489
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql, because the dates must have quotes on each side. I just don't know how make the dates right. Well I'll just show you the code and some insert statements it generates. Could anyone please help me?
14
2154
by: TrvlOrm | last post by:
OK. After much playing around, I managed to get my frame page this far.. see code below. BUT...there are still errors with it, and what I would like to have happened is this: 1) On the Left Frame (File LeftEx8_2.html) a series of buttons, which when clicked prompt the user to enter information for background color, text color, link color, title and some text.
9
1601
by: Daz | last post by:
Hello hello! I'm trying to finish off putting my design into HTML and I've come across a problem that I can't get my head around. I've got divs floating in two columns, but I'm having problems trying to put in images and floating them left or right. In safari it leaves a gap inbetween two of my divs and the image overlaps the gap, in IE it does the same unti you mouse over the hyperlink in the div, which then hides the gap and puts...
23
3269
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application to create certain textboxes, labels, and combo boxes? Any ideas would be appreciated. Thanks
8
1115
by: Roger Chapman | last post by:
I have a problem I can't seem to find any help on, I really hope someone else has come across this and kno9ws the answer. When outputing to a list box using the items.add, and then run the code it does not show the text. I can see that there is something there as there is a scroll bar that shows up, but can't see it, in an alert I see the texct on the titlebar but no where else. I have uninstalled and reinstalled but still get the same...
28
10261
by: Tim_Mac | last post by:
hi, i'm new to .net 2.0, and am just starting to get to grips with the gridview. my page has autoEventWireUp set to true, which i gather is supposed to figure out which handlers to invoke when appropriate based on your method names . the GridView has OnRowCommand="GridView1_RowCommand" in the aspx. my problem is that the RowCommand event is firing twice (95% of the time) on the page. the other 5% it only fires once. there's no
6
22803
by: Edward | last post by:
I have been doing some research about embedding images in HTML using the data URL src method of the format: <img src="/-/data:image/gif;base64,<DATA>"> My question is, how does one generate this <DATA> string? I have found some on the web that I can load into my browser but if I save this image and then view in Notepad it looks much different than the string that I used in <DATA> and is full of non-alphanumeric symbols. Also, I have...
0
1088
nomad
by: nomad | last post by:
I made a simple GUI program in which I want to place a .gif into a button. I did this but the .gif does not show up. The load.gif is in the same package (chapter 10) as the project. If I take these files to a default package it will work. So I know there must be a way to call the gif (ie make a dir to find the image) Can someone help please Here is my code package chapter10;
1
1123
by: zombie212 | last post by:
I have devoloped a page in asp.net with datagrid with code behind in VB, to show the result of SP_ who2 ( SQL Server System stored proc). Now I have also added a refresh button to update the page, When I refresh the page users keep incrementing which in turn get added to the database, Please help me in showing the correct users not the repeated ones. thanks!!!!
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8610
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7740
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.