By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,939 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,939 IT Pros & Developers. It's quick & easy.

Image & PictureBox VB vs. VBA

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.