473,770 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

attaching picture to table

rb
I am making a simple inventory control db. I want to include a picture of
the item in each record. The picture will be from digital camera and in jpg
format. I want to be able to browse and choose the picture as i am inputting
info about each item. It would be best if the picture was imbedded into the
db rather than a link to jpg file.
thanks for any help
ron
Jan 1 '06 #1
1 1558
Hi rb,

In my opinion embedding images in a table is BAD; causing massive
bloat. I would (and do):

a) open the file selection dialog
b) have the user select the image file
c) copy the selected file to an image directory in the db directory
d) rename the copied file to the primary key value of the active record

then when you want to refer to the image you can do something like:

If Len(Dir$(Curren tProject.Path & "\Photos\" &
Forms!frm_Main! txt_ProdID & ".jpg")) = 0 Then
Forms!frm_Main! Image56.Picture = CurrentProject. Path & "\None.jpg"
Else
Forms!frm_Main! Image56.Picture = CurrentProject. Path & "\Photos\" &
Forms!frm_Main! txt_ProdID & ".jpg"
End If

Hop this helps :)

Jan 1 '06 #2

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

Similar topics

6
2172
by: .: DeVa :. | last post by:
How can i brows for picture on disk and then save it into array for mailing ? ------ www.podvodni-svijet.com "Half-brother in blood, full brother in heart will I be. Thou shalt lead and I will follow. May no new grief divide us."
3
15532
by: Rob Davis | last post by:
I am familiar with VBA and the manual method of attaching/linking external data tables (File, Get External Data etc). I am also familiar with opening tables which exist in the current Access file, in VBA and reading / writing records. What I want to do is attach external data tables in VBA ... can anyone please help? I suppose I could do it with SendKeys, but that's clumsy. =============================
1
8354
by: Matt Evans | last post by:
Hi, this must have been asked for before, but I cannot see it. Hopefully this is very simple. I have a form which shows everything from a table. In this table is a picture field called photo. I need to show the picture which corresponds to the description (which is in another field in the same table). i.e. the description is the House name, and I need to show the picture for that house.
0
1370
by: Lyn | last post by:
This one is driving me crazy. I have a table which stores pictures in an OLE Object column, one per record with a few other text fields (caption, date, etc). This table is maintained with a form to which the fields of the table are bound. When the form opens, focus is set in the Bound Object Frame (olePhoto). At this stage of development, I am simply pasting bitmap pictures into the frame and saving them. The problem arises when I...
3
4667
by: abspring | last post by:
Hi I am a technology teacher/support person at an elementary school. I have created a database in which I need to insert a picture for each of our 650+ students. I have a table of student information with the student id as the primary key. Another table is the student photos table that has the student id and the imagename.bmp of the photo of that student and a OLE Object field for the picture image. All of the actual picture files are .bmp...
46
10099
by: OldBirdman | last post by:
What a mess this question is. I have spent 2 weeks trying to make it concise and clear, and I can't. I do not have the vocabulary for the question. I cannot even TITLE it correctly. Here is my best effort. Conditions: 80,000+ pictures (These are pictures of birds, ID by Species, Sex, Age, etc. (If known)) Hierarchy of folders: Continent->Country->State(if India, Mexico, USA, Canada, & Australia) (No state for other countries) I am...
1
1194
by: Josephbupe | last post by:
I am trying to adopt the code below to store a picture file in a table filed so that i can view it any time i open the form with its control. However, this code did not do that. When i loaded the picture quite well its path was saved in the table field but after i close the form and reopen it i could not see the picture. How can i always make the picture viewable. The form name is frmComment The table has two fields: ItemID and PicFile ...
1
1489
by: Forsi | last post by:
Hello I don't know a thing about writing VBA Codes but this forum I was able thas helped me to finally figure out how to link the pictures to a path etc on a form. Everything works fine on the form - the pictures change with each employee etc, etc. However, when I select the command button "change picture" or "Remove", it opens the dialog box or the folder on the c:\drive etc and I can select a new picture or the one for deletion; BUT I...
1
3812
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown properties alt in img tag istead of picture . place of the pictures is saved in the database(my database is with mysql) and in home page i fetch properties of the product and address of place that pictures is located output of the code in the...
0
9617
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
9453
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,...
1
10036
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
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
8929
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...
1
7451
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
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();...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2849
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.