472,986 Members | 2,923 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,986 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 28042
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: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.