Image in Access 2007

A

Ac

Hi,

I saw some introduction of the Access 2007; it said that the new Access 2007
can add pictures on multiple forms without coding. Does the Access 2007 allow
the user to browse the image from a folder and display them in the
corresponding record or user has to put the path of the images into the text
box through a form? Thanks!
 
A

Allen Browne

The image control in Access 2007 has a ControlSource for the first time, so
it can easily display an image named in your text file.

To get the image file name and path into the text box, you can just type it,
or you can run some code to get the file name. Here's the code we usually
use for that:
http://www.mvps.org/access/api/api0001.htm
 
A

Ac

Hi Allen,

Thank you very much for your information. It is very helpful.

May I ask you some other questions, if you do not mind? What is the meaning
of following code? Do they call the build-in functions or Library? And do I
need to include some type of Reference in the Tools to use these build-in
functions?

Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias
"GetOpenFileNameA" (pOpenfilename As OpenFilename) As Long

Private Declare Function GetSaveFileName Lib "comdlg32.dll" Alias
"GetSaveFileNameA" (pOpenfilename As OpenFilename) As Long
 
A

Allen Browne

You don't need a reference: they are actually calling functionality that
Windows provides.

Windows has dialogs for File Open/Save. Microsoft exposes these through the
Applications Programming Interface (API.) These dialolgs come from the part
of Windows handled by comdlg32.dll.

So the code is an API call to Windows, and doesn't need another library
reference.
 
A

Ac

I appreciate your information. Thanks again!

Allen Browne said:
You don't need a reference: they are actually calling functionality that
Windows provides.

Windows has dialogs for File Open/Save. Microsoft exposes these through the
Applications Programming Interface (API.) These dialolgs come from the part
of Windows handled by comdlg32.dll.

So the code is an API call to Windows, and doesn't need another library
reference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top