Picture as form backround from data table

  • Thread starter Thread starter Guy
  • Start date Start date
G

Guy

What is the coding to load a picture from a table in the current database
into a form's Picture property?
 
Guy said:
What is the coding to load a picture from a table in the current database
into a form's Picture property?

Something like the following although that is for an image control
named PhotoImage

If <logic if file available to view> Then
Me.PhotoImage.Picture = PhotoFilePath
Else
Me.PhotoImage.Picture = ""
End If

For a form replace me PhotoImage with Picture.

However I wouldn't do this unless on a menu. Even then I would leave
the picture separately. With a busy background users will have
trouble locating fields or the mouse pointer.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
I'm sorry but while I understand how this would work for a file on a disk
drive, I do not know what the code would look like for a picture stores in a
table called say: "PictureTable" which would be a table in the currentdb. I
am still learning to use tables directly, I have mostly used SQL not Access
and even then not for something like this.
 
Guy said:
I'm sorry but while I understand how this would work for a file on a disk
drive, I do not know what the code would look like for a picture stores in a
table called say: "PictureTable" which would be a table in the currentdb. I
am still learning to use tables directly, I have mostly used SQL not Access
and even then not for something like this.

Sorry I missed the part about the picture being in a table.

Code would be much the same I would think.

Me.PhotoImage.Picture = RS!BlobFieldName

However I've never done this so I'm not sure if this is the correct
syntax.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Back
Top