Quantcast
Channel: AccessImagine
Viewing all 22 articles
Browse latest View live

How to show pictures in Access continuous forms

$
0
0

continuous

This article shows the proper way of image handling in continuous forms with the help of AccessImagine control. If you are looking for answers on some common questions about continuous forms, check the Continuous forms FAQ.

First of all just imagine one thing: time passed and you’ve got a 1000 pictures or so in your database. Every time you open continuous form with that images, your computer loads all of them at once. Surely it will have the hard time and even can freeze at once.

So what’s the solution? You don’t really need to show big pictures in continuous form. You need thumbnails. Thumbnails in OLE format for Access to handle it properly.

You can download the MDB file with entire solution to play with it:

Continuous pictures demo (Microsoft Office Access Database, 556 Kb)

.

Step-by-step

1. Lets assume you have AccessImagine picture control on your record edit form and its called Pic.

2. Create thumbnail field in your table (lets call it Preview) of OLE type.

3. Add On Exit event handler to your Pic control and insert this line:

if Pic.Changed then Preview.Value=Pic.PreviewOLE(128)

Now your Pic control generates a preview every time its picture is changed. Here 128 stands for preview longest side in pixels.

4. Create your continuous form, place Bound Object Frame on it and bind it to Preview field.

Now you’ve got continuous form with pictures, made in proper way.


Microsoft Access sample database

$
0
0

Download this tiny database to test extended imaging capabilities.

Continuous pictures demo (Microsoft Office Access Database, 556 Kb)

Techniques demonstrated here:

  • thumbnails generation
  • continuous forms with pictures
  • on-demand AccessImagine installation
  • instructing user how to turn active content on

Microsoft Access continuous forms FAQ

$
0
0

Site log analysis indicated, that a lot of people come here to find some answers about continuous forms. So, we decided to create this FAQ, to answer all questions you may have about that continuous forms.

Introduction

Microsoft Access continuous form is a special form type, when entire form design is repeated for each record of the data source. It gives you ability to make something different to usual “table-view” approach, hovever you are still limited to “striped” design.

Core problem

Access doesn’t create separate form object for each record. It just makes one form to draw several times with different data. This leads to following limitations:

  • Any changes to form controls or properties thru VBA affects appearence of all the records
  • Event handlers you suppose to be executed for every record, execute only for the first one
  • It is restricted to place ActiveX controls on continuous form

There is no ways to bypass this limitations directly. Remark: this limitations doesn’t apply to header and footer of the form – because it is not dublicated.

FAQ

Once we made thru basics, lets answer the questions. If you have question not being answered here, don’t hesistate to ask it at the bottom of the page.

How can I make controls to look different in different records?

The only way is to use Format->Conditional Formatting feature. In Access 2007 you can put right mouse button on the row title in table view to reach it. Sure, its limited alot, but there is no much choice here.

How can I show pictures from database?

All the methods that utilize regular data-bound controls are valid. You can use Bound Object Frame, in Access 2007 – Attachments and Image controls. However, you can’t use any VBA scripting with em.

How can I show some conditional data or pictures?

The only way to achieve this is to build custom queries, that perform checks and calculations you need and prepare data to show.

How can I show pictures, that are stored externally?

In Access 2007 there is an improvement to regular Image control. It will display image from file, if you bind it to the field or expression that provides image path and filename. This works in continuous forms too.

In pre-2007 versions of Access you need to have picture previews saved in your database as OLE data type. AccessImagine control handles their creation and maintaining easily.

How can I do something, that Access limitations doesn’t allow me to do?

If there is no tricks to save the situation, people usually mimic continuous forms, creating a form that displays several records at once with paging buttons. There are 2 downsides of this approach. First – it requires a lot of VBA coding. Second – you loose all the built-in features users can utilize to any Access form – sorting, search and filters.

Try to avoid this path until you have some time to waste.

Not found an answer you need? Post a question at the bottom!

What does developer license mean?

$
0
0

As you know, you get a developer license for single purchase price. There is no any “single”, “per-user” or “server” complicated licensing stuff. We tried to make things as simple as possible.

Once you get AccessImagine registered, you are an developer. Every Access database you create with AccessImagine holds your mark, and appears nice & registered to every user.

The main plot is:

You don’t need to activate AccessImagine on every user’s computer.
Its enough to activate it on PC you are developing the database.

There is one remark to this. When you have developed a database with shareware (non-activated) AccessImagine, and activated it recently, you need to “touch” every AccessImagine component on every form to update it status. “Touch” mean some manipulation like “open form in design view, move component or change some it property back and forth, than close form with saving changes”.

Sure, this topic is not so easy to understand. Please ask questions and we’ll explain better.

<p>As you know, you get a developer license for single purchase price. There is no any “single”, “per-user” or “server” complicated licensing stuff. We tried to make things as simple as possible.</p>
<p>Once you get AccessImagine registered, you are an developer. Every Access database you create with AccessImagine holds your mark, and appears nice &amp; registered to every user.</p>
<p>The main plot is:</p>
<p><span mce_name=”strong” style=”font-weight: bold;” mce_style=”font-weight: bold;”><span style=”color: rgb(255, 0, 0); ” mce_style=”color: #ff0000;”>You don’t need to activate AccessImagine on every user’s computer.</span></span><span style=”color: rgb(255, 0, 0); ” mce_style=”color: #ff0000;”> </span><br>Its enough to activate it on PC you are developing the database.</p><p><br></p><p>There is one remark to this. When you have developed a database with shareware (non-activated) AccessImagine, and activated it recently, you need to “touch” every AccessImagine component on every form to update it status. “Touch” mean some manipulation like “open form in design view, move component or change some it property&nbsp;back and forth, than close form with saving changes”.</p><p>Sure, this topic is not so easy to understand. Please ask questions and we’ll explain better.</p>

New features in update 1.08

$
0
0

We have new AccessImagine update out with few good features people asked for.

onclick

Now AccessImagine can show the big picture, when you click on control. New OnClick design-time option lets you choose between viewing the picture on full screen, panning it around with hand tool or using default system application to show it.

HideButtons option gives an ability to turn off buttons, transforming AccessImagine control into simple picture box.

We have added some missing scripting commands: Scan, Copy and Paste.

All the changes are desribed in Documentation. You can get updated component in Download section.

Update 1.10 – HTTP images and old OLE data support + tweaks

$
0
0

Great news!

AccessImagine got updated with awesome features and tweaks. Honestly speaking, it became now most functional and complete imaging solution for Microsoft Access around. Beside that it became extra simple to use for beginners. Most usage cases doesn’t require reading any documentation, just drop it on form, bind – and the way you use images in databases is changed forever.

HTTP (web) images

It is quite a problem for Access to get image from web. Now it is so easy as Pic.LoadFile “http://mysite.com/intro.jpg”. Also you can bind AccessImagine directly to URL field. Of course, you can do any manipulations with that web content – save to database, write to file, crop, resize and so on.

Old OLE data support

Now AccessImagine can understand that data of regular OLE controls. You don’t need to perform mass convertion operations to get rid of them. Bind AccessImagine and it will care the rest. While you edit or insert new images, it will be written in JPEG format.

Remark: AccessImagine doesn’t understand iconic or “filename-only” OLE. In other cases, if your data isn’t recognized properly – please send a sample to us and we will fix it quickly.

 Other tweaks and fixes

  • Now AccessImagine can be bound directly to the table or query field, that holds filename with path or URL. Control works in show-only mode in this case, with editing buttons hidden
  • Scanning sourse selection via pressing right mouse button on Scan icon
  • Undo tool got fixed and is more useful now
  • VBA scripting additions: Crop (X,Y,X1,Y1), TurnLeft, TurnRight, PicWidth, PicHeight
  • Paste and Scan VBA methods fixed

Please, don’t hesistate to write access@bukrek.net if you have noticed any bad behavior, want to add some feature to  AccessImagine  or simply need help or advise.

AccessImagine 1.30 with x64

$
0
0

Greetings!

We are glad to inform you about AccessImagine 1.30 release. Now it supports 64-bit Office and WIA image sources (scanners, cameras and mobile phones).

Also this version contains some fixes, like image flickering and natural external images naming.

Update 1.40 – webcams and more

$
0
0

Great news!

AccessImagine 1.40 release is dedicated to complete image aquire scheme and some other useful features.

Get image from any device

Now you can use any webcam to take pictures right to dabase. At the same time AccessImagine supports TWAIN and WIA interfaces. Please note, that you can’t use TWAIN in 64-bit Office.

Use right mouse click at Scan button to select image source.

Background color

New Background property holds the color of AccessImagine control in hex form (like F0F0F0).Please note, that EmptyImage doesn’t have the White choice anymore. Set Background to FFFFFF instead.

Rename files in external storage

Now you can rename files in external storage with VBA command like this: Pic.Rename(“mypic”)

 

Also release includes few bug fixes and improvements.


AccessImagine 1.50 Update

$
0
0

AccessImagine 1.50 Update includes:
- proportional Crop
- unlimited Undo
- Lazy Binding

Lazy Binding is new approach to external image storage. Once you specify StoragePath (folder where pictures will be saved), you can bind AccessImagine to any field – even to field ID.

AccessImagine will use that field as source of image filenames (adding ‘.jpg’ extension if neccessary). On adding/changing image into control the file with such a name will be created/modified.

Note: previous external storage scenario got some changes in the sake of overall simplicity.
1. Once the bound field holds some filename, if will not be changed (new image will be written at the same filename).
2. When the image at control is deleted, the field contents is not cleared (but file is deleted).

AccessImagine 1.60 – all webcams covered

$
0
0

This release features completely new webcam capturing code. It should work with any webcam now.

+ high-resolution capture

+ unattended webcam capture with Pic.InstantScan VBA command

+ old webcam code is accessible as Microsoft WDM Driver at sources list

New Year Gift – AccessImagine 1.62

$
0
0

Happy New Year, MS Access Pros!

To make things moving on the 1.62 version is released. It includes few nice changes you’ve asked for.

  1. New Device button instead of old Scan button. Most of us use webcams, right?
  2. Resolution selection dropdown at Shoot Window
  3. Full resolution support for webcams with I420 and other codecs
  4. Deploy package added – without license agrement step and demo database installation
  5. Some minor fixes

Download new version here – http://access.bukrek.net/download
Have fun!

AccessImagine 1.63 – signed and updated

$
0
0

Greetings!

New AccessImagine version is released. At last all files are signed with digital signature, that will stop Access from showing scary warnings. Also it is wrapped into full-featured installer package.

Webcams support got some improvements. If you notice your webcam is not working or taking low-resolution shots – please mail your color mode (letters after resolution numbers, like 1024×768 YUV2) at access@bukrek.net

Here are some VBA additions:

  • Pic.InstantScan got optional delay parameter – it will wait delay seconds after device initialization before taking image (it may be needed for some cams that adjust focus/brightness at first few seconds).
  • Pic.ScanSource (read-write property, number of image source, where -1 is WIA, -2 is TWAIN, -3 is Microsoft WDM, 0 and up – direct webcams)
  • Pic.SelectSource – opens source selection dialog
  • If empty.jpg image is present at StoragePath location, it will be used for empty control display.

AccessImagine 1.64 update

$
0
0

Good news!
AccessImagine got minor 1.64 update. It includes some vital fixes:

  • StoragePath logics fix
  • Webcams are default image source now (instead if WIA/TWAIN)
  • Filenames are now deleted from table on image deletion (as it was before)

How to keep pics somewhere else?

$
0
0

They say its better not to put images to database. Maybe its rumors, maybe not. Anyway, large amount of images makes DB fat and thus stresses database application. Its not easy to handle fat beings, huh.

Thanks to AccessImagine, all you need to specify is where to keep images – and it will do all the job by itself. If you try to code external storage by your own, you will have hard times. Not worth getting in trouble with.

There is StoragePath property accessible at the design-time. After specifying it  AccessImagine will store images there while image filenames will be written to the bound database field.

Here is an example of the StoragePath property values:

  • D:\MyWork\Images
  • \\Avenger\Incoming\Pics” – local network path, useful for centralized storage
  • Pics” – subfolder in folder, where your database file is stored
  • .” – keep images in the same folder with database file

AccessImagine tries to preserve original name of the picture – or gives some common name (like “image”, “scan”, “paste”) if it originated from the other source. Surely, component adds some numbers for duplicate filenames.

Notice: if a file is no longer needed (i. e. user put a new photo instead the old one) it will be deleted from the storage.

How to make thumbs?

$
0
0

In nice applications usage of thumbnails (or previews) of your pictures is a necessity. It speeds up things when you use small pictures to show small pictures instead of shrinking big pictures everytime.

Thumbnails generation in Microsoft Access can be done with one  line of code using AccessImagine.

So, lets take all the 3 steps to add thumbs to your pictures in some table.

1. Lets make some place for holding thumbs. Create a new field of OLE (or BLOB) type and call it Preview

2. Then make AccessImagine write a preview – add this line to the Exit event handler of control (lets assume its name is Picture1):

If Picture1.Changed Then Preview.Value = Picture1.PreviewJPG(128)

128 here means that the height (or width, if pic is landscape) will be 128 pixels. If you omit this number, then it will default to 64.

3. Then u need to… emm… Have we promised 3 steps for you? It was just a joke – we are done in two steps.

There is one note about previews here – they are generated at the moment user puts or changes image, so dont expect to generate previews for whole database with this two steps.


Getting started (video)

Action video

Managing pics in .NET – VB, C#, C++

$
0
0

You often need users to provide some pictures to your application – even if it is not database-driven. Its quite time-consuming task to develop a good functionality for end users – and you leave it at some basical stage (like “press-a-button-and-find-the-picture-you-want-to-add-at-your-computer-in-BMP-format-and-if-you-don’t-have-one-then-create-it-before”). Surely it affects the whole application usability significantly.

With the help of AccessImagine you can add rich user experience never seen before when one submits some picture(s) to application. Just take a look at the action video (if you havn’t seen it before).

So, if you use some of the .NET programming languages – Visual Basic, C++ or C# – you can add such a behaivior to your app in few clicks.First, you need AccessImagine ActiveX, download it here (591 Kb) and execute.

After that press right mouse button on your Toolbox and select Choose items… .
On Com Components tab find AccessImaginePicture Control and check it.

toolbox

Sound tricky a little bit, but you have to do this only once. Now you have AccessImagine in your Toolbox in the Components category.

Database app

If you develop some database application,  you just need to add AccessImagine control to your form and bind its ImageBind property to picture database field. Thats it, up and working.

bind

In case you do not store images in database, but only the filenames set the StoragePath property to place you keep images and make sure that ImageBind is bound to database field which holds the filenames.

Other app

Its not a must to use database for holding images. You can use AccessImagine as you like without any database bindings.

1. It has Image property you can write and read. It is a containing image in JPG format or its filename – if you specified StoragePath.

2. It has Changed function to determine if image has changed.

3. It has LoadFile and SaveFile functions.

You can read more about AccessImagine programming interface here.

How to show pictures in Access continuous forms

$
0
0

continuous

This article shows the proper way of image handling in continuous forms with the help of AccessImagine control. If you are looking for answers on some common questions about continuous forms, check the Continuous forms FAQ.

First of all just imagine one thing: time passed and you’ve got a 1000 pictures or so in your database. Every time you open continuous form with that images, your computer loads all of them at once. Surely it will have the hard time and even can freeze at once.

So what’s the solution? You don’t really need to show big pictures in continuous form. You need thumbnails. Thumbnails in OLE format for Access to handle it properly.

You can download the MDB file with entire solution to play with it:

Continuous pictures demo (Microsoft Office Access Database, 556 Kb)

.

Step-by-step

1. Lets assume you have AccessImagine picture control on your record edit form and its called Pic.

2. Create thumbnail field in your table (lets call it Preview) of OLE type.

3. Add On Exit event handler to your Pic control and insert this line:

if Pic.Changed then Preview.Value=Pic.PreviewOLE(128)

Now your Pic control generates a preview every time its picture is changed. Here 128 stands for preview longest side in pixels.

4. Create your continuous form, place Bound Object Frame on it and bind it to Preview field.

Now you’ve got continuous form with pictures, made in proper way.

Microsoft Access sample database

$
0
0

Download this tiny database to test extended imaging capabilities.

Continuous pictures demo (Microsoft Office Access Database, 556 Kb)

Techniques demonstrated here:

  • thumbnails generation
  • continuous forms with pictures
  • on-demand AccessImagine installation
  • instructing user how to turn active content on
Viewing all 22 articles
Browse latest View live