AboutScottgem Expertise I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.
Experience I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.
Organizations Author of Microsoft Office Access 2007 VBA Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing
Question sorry to stalk you again but as i said before im a rookie at this
and i still didi not get it to work
i did this
enterd an unbound object choose a random picture (in propertys i namend the box PIC 1)
then i placed the text box with has the name of the docu ment in it on the form (in my main table this field is called "screen shot 1" so this is then the name of the text box)
then i richt click any wher on the form and go to "build event" / "expression builder"
and enter this text : me.imgpic1.picture=me!textscreen shoot 1
but then i get al sorts of syntax errors
what do i do wrong ???
thanks again and again
-------------------------
Followup To
Question -
hi there again thanks for the answer only the answer gave a few new questions
(btw im a learning quite fast but still a beginner at access)
when i want to ad an unbound object the wizzrd automaricly starts ... wat do i do and what do i select ... canceling ends up in deleting the object
then in this line "Me.imgPicture1.Picture = Me!txtPicture1" im i correct when i think "picture1" is the field name?? and is this a "evnt build up" or a programm code
then you state "Generally this is done in the On Current event of your form" where is this on cuurent event
i looked in properties but ther i found before update and stuff like that
thnaks in advance AGAIN
-------------------------
Followup To
Question -
hi there just a small question
i use access 2003 (reinstalled photo editor sa that i can use jpg in access)
in my data base i use about 3 pictures per record
now if linkend them instead of imbead them
my data base got quit big
(there are 345 records)
the pictures are all the same size (400kb)
is it normal that the data base grows more the the size of the picture even if you just link them ????
for example my data base is 1,2GB with pictures
and 119 with out pictures
but the total of pictures combined are roughley 360 mb (i already used repair and compact)
so the question is is this normal ???
thanks in advance
Answer -
Yes it is normal, that's why its not recommend to use an OLE field to display pictures. What I do when I want to display a picture associated with a record is to store the path and filename of the image file in the record. I then use an UNBOUND image control and set the Picture property of that control to the image file. Generally this is done in the On Current event of your form. Something like this:
Me.imgPicture1.Picture = Me!txtPicture1
HTH
Scott<>
Answer -
When you drag an Image control onto a form it prompts you to select a Picture file. You can select any picture file, doesn't matter.
The imgPicture1 is the name of the Image control. The txtPicture1 is the name of a text control bound to the field that stores the path and file to the picture.
The On Current is an Event for the form, not a specific control. You have to click in the area ourside the grid but within the form window to select the form.
And yes, you want to use Code Builder or expression to enter the code.
It has info about naming conventions to use in building Access apps.
Second, you should not use spaces in object names. That's what's causing your problems.
The line should be:
me.imgpic1.picture=me!textscreenshoot1
This means changing the name of the control. Also, you said you named the control PIC 1, but you are referring to imgpic1. If you do put spaces in object names you need to bracket them so that:
me.imgpic1.picture=me![textscreen shoot 1]
would also be correct.
If you do get an error message, you should let me know the message. Sometimes the problem may not be as obvious and knowing the message may help me diagnose the problem.