Full Version: Set Stdpicture Object To Form.picture (or Control.picture)
UtterAccess Forums > Microsoft® Access > Access Forms
benroles
Hi all,
I'm curently writing a database that contains a modified snippet of code I found online. It basically renders a BMP as a background for my form (amongst other stuff). This is all good and I've modified it as needed - working perfectly.
However, the BMP itself is actually loaded from an external file as follows (condensed code):
Dim objBitmap As StdPicture
Set objBitmap = LoadPicture(stBitmapPath)
This, as I say, works fine.
However, I don't want to reference an external picture but a BMP I am already using on the form. For example, a form I have created has a background picture that I want to pass to this defined object in VBA. I have therefore tried:
Set objBitmap = form.Picture
However, this gives a Type Mismatch error.
I've searched various forums and tried various combos of code and cannot for the life of me figure this one out.
I'm not usually a person to write for help unless I really need it - prefer to try and try 'till it succeeds (you know the type < ) - as such, help from a greater man (or woman) would be appreciated!
Regards,
Ben.
benroles
A gentle bump to see if anyone can help on this one?
Thanks,
Ben.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.