473,394 Members | 1,813 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,394 software developers and data experts.

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 1547
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$(CurrentProject.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
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...
3
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,...
1
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....
0
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...
3
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...
46
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...
1
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...
1
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...
1
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...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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
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...

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.