473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Images on forms

Here's some fresh meat for the newsgroup hyenas.

I'm pretty new to setting up Access db's, so please be gentle.

How do I get my user forms to display a linked image file for each record.
(Eg. person's mugshot on a form with their personal details). This sounds
simple, and I'm surprised that I haven't worked it out yet.

I've tried the most obvious ways, but only seem to get the file icon not the
image itself.

Thanks, and sorry for wasting your valuable time.

DA
Nov 13 '05 #1
3 1395
Darren Allen wrote:
Here's some fresh meat for the newsgroup hyenas.

I'm pretty new to setting up Access db's, so please be gentle.

How do I get my user forms to display a linked image file for each
record. (Eg. person's mugshot on a form with their personal details).
This sounds simple, and I'm surprised that I haven't worked it out
yet.

I've tried the most obvious ways, but only seem to get the file icon
not the image itself.

Thanks, and sorry for wasting your valuable time.

DA


Not done it myself but make sure you're working with bitmaps first and
foremost. I don't think Access likes anything else.
Nov 13 '05 #2
On Sat, 21 Aug 2004 02:28:23 +1000, Darren Allen wrote:
Here's some fresh meat for the newsgroup hyenas.

I'm pretty new to setting up Access db's, so please be gentle.

How do I get my user forms to display a linked image file for each record.
(Eg. person's mugshot on a form with their personal details). This sounds
simple, and I'm surprised that I haven't worked it out yet.

I've tried the most obvious ways, but only seem to get the file icon not the
image itself.

Thanks, and sorry for wasting your valuable time.

DA


Add a field to your table, [Picname], that stores the name of the
picture associated with the person, i.e. "JohnSmith.jpg"
Store all the pictures in the same folder, but not as part of the
database.

Add an Image control to the form using any image to start with.
Set it's PictureType property to Linked.
After you save the control, delete it's Picture property.

Then code the Form's Current Event:

On Error Resume Next
Me!ImageName.Picture = "c:\Folder Path\" & Me![PicName]

You can use, among others, .bmp, and .jpg picture types.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3
"Darren Allen" wrote
Here's some fresh meat for the
newsgroup hyenas.
Eh? Would you care to clarify whether that was intended to be "cute" or
insulting?
How do I get my user forms to display
a linked image file for each record.
(Eg. person's mugshot on a form with
their personal details). This sounds
simple, and I'm surprised that I haven't
worked it out yet.
. . .
Thanks, and sorry for wasting your valuable time.


If we thought answering questions in newsgroups was a waste, chances are
high that we wouldn't do it. Most of us have been helped many, many times
and the only repayment ever asked was that, when able, we help someone else.

The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #4

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

Similar topics

9
by: Terrance | last post by:
Good Afternoon: I was hoping if someone could share some light on a problem that I'm facing. When I create a Visual Basic.Net program and I use the XP style for my Window Forms and buttons; if I...
3
by: Dave | last post by:
Hi, I have an app that uses rollover images, but the images are still pulled from the web server during a mouseover instead of being pulled from memory. The code is as follows: the...
1
by: Starwood | last post by:
After getting around a problem with the Norton utilities, I have finally been able to get .jpg images linked to my table. When I try to display the images using a form, the form presents icons...
5
by: Lauren Quantrell | last post by:
I am really stumped on coming up with a good solution for this problem... I have an Access2K continuous form that has an image field. In a SQL Server table of appointments is an integer field...
3
by: Bruno Rodrigues | last post by:
Hi, Everytime I use a image in a Windows Form, Visual Studio.Net creates the image in the respective resx file. This can be very expensive in a project with about one hundred forms, where images...
3
by: mraj | last post by:
Hello... I am new to C#. My requirement is that, I will receive over 100s of images from the network to local machine and display these images on an image viewer one by one on mouse scroll. To...
2
by: Sanjeeva Reddy | last post by:
hai Anti Keskinen, i have used the following code MyListView->LargeImageList->ImageSize = gcnew System::Drawing::Size(100, 100); // Sets large image size to 100, 100 here i am getting error...
1
by: Ofer_Adivi | last post by:
I'm using Forms Authentication in my site. And my login page did not show the images at run time. while i'm drop the Forms Authentication it seems to be good. This is my Code <authentication...
11
by: Usenet User | last post by:
..NET 1.1/2.0 I have a need to display high-resolution scrollable images in a .NET application (Windows Forms). One well known solution is to create a Panel with AutoScroll set to "true" and...
5
by: remon87 | last post by:
I need some help. I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.