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

Image & PictureBox VB vs. VBA

In VB6.0, I can put an image on a form and assign it's .picture property at
run-time.
In VBA (within MS Access), when I put down an image control on a form, it
asks me for the source to the image (at design-time). Why?

Why can't I find PictureBox in VBA within MS Access?

And most importantly...why can't I put either in a Report within MS Access?
What I really want is to be able to display pictures in an MS Access report
(pictures which are .bmp files).
Why Why Why.... so many questions :)

Thanks in advance for any insights.

-Ed

Cross Posting to:
comp.databases.ms-access; microsoft.public.office.developer.vba;
microsoft.public.vb
Nov 12 '05 #1
4 28128
Answers inline...

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Ed Landau" <au*********@yahoo.com> wrote in message
news:T6*******************@newssvr21.news.prodigy. com...
In VB6.0, I can put an image on a form and assign it's .picture property at run-time.
In VBA (within MS Access), when I put down an image control on a form, it asks me for the source to the image (at design-time). Why?
That's just the way the control's interface was designed. You can still
set the control's Picture property at runtime for both forms and
reports.
Why can't I find PictureBox in VBA within MS Access?
It simply doesn't exist as most Access controls are lightweight in
nature(no exposed hWnd). Control's are lightweight due to
resource/complexity issues that presenting forms in Continuous/Datasheet
view would present. I have produced a class wrapper for the standard
Acces Image control to allow it to emulate the VB PictureBox control
here:
http://www.lebans.com/imageclass.htm
And most importantly...why can't I put either in a Report within MS Access? What I really want is to be able to display pictures in an MS Access report (pictures which are .bmp files).
Not sure why you are having trouble here. For Forms you simply set the
Image control's Picture property in the Current event. For reports set
the control's Picture property in either the section's Format or Print
event.

Why Why Why.... so many questions :) Because you believe that the VBA environment, in particular the Access
VBA environment should be identical to that of VB. They are two very
different development platforms. Use the Object browser to examine the
Acess objects exposed methods and properties to help you understand the
difference between the Access VBA and VB development platforms.
Thanks in advance for any insights.

-Ed

Cross Posting to:
comp.databases.ms-access; microsoft.public.office.developer.vba;
microsoft.public.vb


Nov 12 '05 #2
Thanks Setphen.
If I put an image in MSAcecss Report. It does not have a .picture or .image
property. I see that property in the Properties window at design time, but
if I set a breakoint at the pageHeaderSection_format, in the immediate
window, the autosense does not expose a "picture" property ??

I've tried other controls and it complains that it cannot set those
properties after report has been started. I'll have a look at your
control.

Thanks again for your help... I'm can see the light at the end of the tunnel
:)

-Ed

"Stephen Lebans" <Fo****************************************@linval id.com>
wrote in message news:Sx********************@ursa-nb00s0.nbnet.nb.ca...
Answers inline...

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Ed Landau" <au*********@yahoo.com> wrote in message
news:T6*******************@newssvr21.news.prodigy. com...
In VB6.0, I can put an image on a form and assign it's .picture

property at
run-time.
In VBA (within MS Access), when I put down an image control on a form,

it
asks me for the source to the image (at design-time). Why?


That's just the way the control's interface was designed. You can still
set the control's Picture property at runtime for both forms and
reports.
Why can't I find PictureBox in VBA within MS Access?


It simply doesn't exist as most Access controls are lightweight in
nature(no exposed hWnd). Control's are lightweight due to
resource/complexity issues that presenting forms in Continuous/Datasheet
view would present. I have produced a class wrapper for the standard
Acces Image control to allow it to emulate the VB PictureBox control
here:
http://www.lebans.com/imageclass.htm
And most importantly...why can't I put either in a Report within MS

Access?
What I really want is to be able to display pictures in an MS Access

report
(pictures which are .bmp files).


Not sure why you are having trouble here. For Forms you simply set the
Image control's Picture property in the Current event. For reports set
the control's Picture property in either the section's Format or Print
event.

Why Why Why.... so many questions :)

Because you believe that the VBA environment, in particular the Access
VBA environment should be identical to that of VB. They are two very
different development platforms. Use the Object browser to examine the
Acess objects exposed methods and properties to help you understand the
difference between the Access VBA and VB development platforms.
Thanks in advance for any insights.

-Ed

Cross Posting to:
comp.databases.ms-access; microsoft.public.office.developer.vba;
microsoft.public.vb

Nov 12 '05 #3
If you are using the standard Image control on your Report then there is
a Picture property. Intellisense is showing you the exposed props and
methods for a generic control not the Image control.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Ed Landau" <au*********@yahoo.com> wrote in message
news:xI******************@newssvr21.news.prodigy.c om...
Thanks Setphen.
If I put an image in MSAcecss Report. It does not have a .picture or ..image property. I see that property in the Properties window at design time, but if I set a breakoint at the pageHeaderSection_format, in the immediate
window, the autosense does not expose a "picture" property ??

I've tried other controls and it complains that it cannot set those
properties after report has been started. I'll have a look at your
control.

Thanks again for your help... I'm can see the light at the end of the tunnel :)

-Ed

"Stephen Lebans" <Fo****************************************@linval id.com> wrote in message

news:Sx********************@ursa-nb00s0.nbnet.nb.ca...
Answers inline...

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Ed Landau" <au*********@yahoo.com> wrote in message
news:T6*******************@newssvr21.news.prodigy. com...
In VB6.0, I can put an image on a form and assign it's .picture

property at
run-time.
In VBA (within MS Access), when I put down an image control on a
form, it
asks me for the source to the image (at design-time). Why?


That's just the way the control's interface was designed. You can still set the control's Picture property at runtime for both forms and
reports.
Why can't I find PictureBox in VBA within MS Access?


It simply doesn't exist as most Access controls are lightweight in
nature(no exposed hWnd). Control's are lightweight due to
resource/complexity issues that presenting forms in Continuous/Datasheet view would present. I have produced a class wrapper for the standard
Acces Image control to allow it to emulate the VB PictureBox control here:
http://www.lebans.com/imageclass.htm
And most importantly...why can't I put either in a Report within
MS Access?
What I really want is to be able to display pictures in an MS
Access report
(pictures which are .bmp files).


Not sure why you are having trouble here. For Forms you simply set the Image control's Picture property in the Current event. For reports set the control's Picture property in either the section's Format or Print event.

Why Why Why.... so many questions :)

Because you believe that the VBA environment, in particular the Access VBA environment should be identical to that of VB. They are two very
different development platforms. Use the Object browser to examine the Acess objects exposed methods and properties to help you understand the difference between the Access VBA and VB development platforms.
Thanks in advance for any insights.

-Ed

Cross Posting to:
comp.databases.ms-access; microsoft.public.office.developer.vba;
microsoft.public.vb



Nov 12 '05 #4
INTERESTING !!!!!!!
"Intellisense is showing you the exposed props and methods for a generic
control not the Image control". I tried it and it worked. Thanks a
bunch ! I always thought that if intellisense was there at all, it was
correct. Now I know not to trust what I see :)

-Ed

"Stephen Lebans" <Fo****************************************@linval id.com>
wrote in message news:sW********************@ursa-nb00s0.nbnet.nb.ca...
If you are using the standard Image control on your Report then there is
a Picture property. Intellisense is showing you the exposed props and
methods for a generic control not the Image control.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Ed Landau" <au*********@yahoo.com> wrote in message
news:xI******************@newssvr21.news.prodigy.c om...
Thanks Setphen.
If I put an image in MSAcecss Report. It does not have a .picture or

.image
property. I see that property in the Properties window at design

time, but
if I set a breakoint at the pageHeaderSection_format, in the immediate
window, the autosense does not expose a "picture" property ??

I've tried other controls and it complains that it cannot set those
properties after report has been started. I'll have a look at your
control.

Thanks again for your help... I'm can see the light at the end of the

tunnel
:)

-Ed

"Stephen Lebans"

<Fo****************************************@linval id.com>
wrote in message

news:Sx********************@ursa-nb00s0.nbnet.nb.ca...
Answers inline...

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Ed Landau" <au*********@yahoo.com> wrote in message
news:T6*******************@newssvr21.news.prodigy. com...
> In VB6.0, I can put an image on a form and assign it's .picture
property at
> run-time.
> In VBA (within MS Access), when I put down an image control on a form, it
> asks me for the source to the image (at design-time). Why?

That's just the way the control's interface was designed. You can still set the control's Picture property at runtime for both forms and
reports.

> Why can't I find PictureBox in VBA within MS Access?

It simply doesn't exist as most Access controls are lightweight in
nature(no exposed hWnd). Control's are lightweight due to
resource/complexity issues that presenting forms in Continuous/Datasheet view would present. I have produced a class wrapper for the standard
Acces Image control to allow it to emulate the VB PictureBox control here:
http://www.lebans.com/imageclass.htm

> And most importantly...why can't I put either in a Report within MS Access?
> What I really want is to be able to display pictures in an MS Access report
> (pictures which are .bmp files).

Not sure why you are having trouble here. For Forms you simply set the Image control's Picture property in the Current event. For reports set the control's Picture property in either the section's Format or Print event.

>
> Why Why Why.... so many questions :)
Because you believe that the VBA environment, in particular the Access VBA environment should be identical to that of VB. They are two very
different development platforms. Use the Object browser to examine the Acess objects exposed methods and properties to help you understand the difference between the Access VBA and VB development platforms.

> Thanks in advance for any insights.
>
> -Ed
>
> Cross Posting to:
> comp.databases.ms-access; microsoft.public.office.developer.vba;
> microsoft.public.vb
>
>


Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dev | last post by:
Dear Friends, I am passing the image name, size (in bytes) and imgaeformat (like jpg or bmp or pdf) through the network. I want display the image into picturebox without saving image...
1
by: Stan Sainte-Rose | last post by:
Hi, I m trying to add a picturebox into a Winform. But when I load a new form using .show the picturebox appears in front of the loaded form. Is it possible to display the form in front of the...
3
by: Tom | last post by:
I have a picturebox on my VB.NET form. The picturebox size mode is set to stretched. I then load an image into that form and display it. As the user moves the mouse over the form, I want to get and...
1
by: Ricardo Furtado | last post by:
in my app i must have several pictureboxes over the others. Some pictureboxes just have a couple of lines or rectangles, and absolutly nothing more but the image is an .BMP. So, my problem is that...
0
by: Ricardo Furtado | last post by:
I'm developing a drawing software in visual basic .Net and i need to copy the image that exists in a picturebox and automaticaly paste it in another picturebox as being part of that other image....
1
by: veer | last post by:
Hi i want to save image from picturebox into sql but i got the error 'ARTHEMATIC OPERATIONS RESULTED IN AN OVERFLOW' On line bytBLOBData = New Byte() {ms.Length} here is my code...
1
by: randyson | last post by:
i am working a "image processing system" project in vb.net using the ms access2007.i have to browse by clicking a button and open a image to display its name to a text box and that image to...
1
by: aznimah | last post by:
HI, i need help on how to draw a square dot when fire mouse click: -onto image in picturebox -the dot size is 10px X 10px -and return the position of dots (x,y) values. here i try some...
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
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.