473,701 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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...w hy 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.publi c.office.develo per.vba;
microsoft.publi c.vb
Nov 12 '05 #1
4 28183
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*********@ya hoo.com> wrote in message
news:T6******** ***********@new ssvr21.news.pro digy.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...w hy 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.publi c.office.develo per.vba;
microsoft.publi c.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 pageHeaderSecti on_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************ *************** *************@l invalid.com>
wrote in message news:Sx******** ************@ur sa-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*********@ya hoo.com> wrote in message
news:T6******** ***********@new ssvr21.news.pro digy.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...w hy 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.publi c.office.develo per.vba;
microsoft.publi c.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*********@ya hoo.com> wrote in message
news:xI******** **********@news svr21.news.prod igy.com...
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 pageHeaderSecti on_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************ *************** *************@l invalid.com> wrote in message

news:Sx******** ************@ur sa-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*********@ya hoo.com> wrote in message
news:T6******** ***********@new ssvr21.news.pro digy.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...w hy 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.publi c.office.develo per.vba;
microsoft.publi c.vb



Nov 12 '05 #4
INTERESTING !!!!!!!
"Intellisen se 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************ *************** *************@l invalid.com>
wrote in message news:sW******** ************@ur sa-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*********@ya hoo.com> wrote in message
news:xI******** **********@news svr21.news.prod igy.com...
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 pageHeaderSecti on_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************ *************** *************@l invalid.com>
wrote in message

news:Sx******** ************@ur sa-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*********@ya hoo.com> wrote in message
news:T6******** ***********@new ssvr21.news.pro digy.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...w hy 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.publi c.office.develo per.vba;
> microsoft.publi c.vb
>
>


Nov 12 '05 #5

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

Similar topics

1
6895
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 files into Hard disk. Just display the image into PictureBox.... Is it Possible? If so how do to this?
1
1384
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 picture box ? Or how to display a centered image in a mdi form using the background ? Stan
3
63429
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 display (in the status bar) the image coordinates of the mouse location. However, if I use the picturebox's MouseMove event, I am getting the coordinates of the mouse over the PICTUREBOX, not the actual image underneath that (which is stretched)....
1
8782
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 i need to see whats beind those pictureboxes and at the same time showing, the lines and rectangles that exist on the pictureboxes that are at the top. Because i just can't copy the image to the other picturebox (because i'll have to be able to...
0
1657
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. Its something like this: in pictureboxA we have the image of an head and in pictureboxB we have the image of an eye, and i need to put the eye in pictureboxA, in its correct location without the user even notice that there is a pictureboxB. Now,...
1
2158
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 sqlConnection = New SqlClient.SqlConnection(sConnectionString) sqlCommand = New SqlClient.SqlCommand("INSERT INTO BLOBTest (BLOBData) VALUES (@BLOBData)", sqlConnection) '//Save image from PictureBox into MemoryStream object. ms = New...
1
3234
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 picturebox.and after that i want to add,del and extract those images to the access database.i want to use datagridview control also. can u help me please?
1
4377
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 code but missing in somewhere, please help me,
0
8736
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8649
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9229
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9083
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8934
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7824
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5904
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4410
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3102
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.