Arvin,
I imported your table, forms, and modules in my db. Your code is based on
having a couple of forms open to me able to call controls and forms Me! I
may
be wrong as I am not real strong using code. I am definetely missing
things
in the code I pasted together. Needless to say what I did does not work.
The
following is what I did, maybe you could look at it and help me correct
it?
Using your table I entered the location and info for my pics. Also using
your forms I was able to call my pics, so that part works. In my form I
pasted your Image control on my main form (frmViewOrders). In my subform
(subfrmOrderLines) I put the following code in the On Current and After
Update Event Proceedure:
Dim MyStr As String
MyStr = Right([subfrmOrderLine].[FinishedItemID], 10, 4)
Me.Parent.[ImageFrame].Picture = Me![FilePath] & Me![FileName]
Me.Parent.[txtPath] = Me![FilePath] & Me![FileName]
All of the names on your form I have made on my form that I think matter.
What do you think?
--
Thanks,
Dennis
:
You can do it with an Image control. There's a sample database on my
website:
http://www.datastrat.com/Download/Picture2K.zip
When using a subform, you should put the image on the main form and call
it
from the subform, the code will change to something like:
Me.Parent.ImageControlName.Picture = strPath
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
In Access I have a form with a subform. In the subform one field
contains
a
shoe style. Based on the orderline one selects in the subform, can a
picture
on the form change to that style shoe? I am thinking that the picture
needs
to be a field in a table and have a PK. And then in another table that
holds
the shoe styles, I can add a field with the foreign key for the
picture
table. I know in a query I can call the picture or record but how can
I
make
the field on the form a picture?