I understand what you are saying.
At present the state of the teeth of a patient are stored as a text string. I just wanted to investigate the possibility to avoid loading the bmp's and to draw the specific picture on the fly. In other words, if a rectangle represents a "filling", I would like to investigate the possibility of drawing the rectangle on the fly instead of loading the specific bmp.
I understand your thoughts now. Personally I would avoid this. As Chris has said drawing on a form on the fly is really hard. By having ready made pictures ready and loading them makes it look like you are drawing on the fly. I have a further suggestion of making the pics on the fly but still think loading a picture to your form is the easiest method.
Using the windows API is difficult with Access because: Windows uses a number called a Handle for each thing (window, button, frame etc) on the screen. The "rules" are that there is parent (a window) then children (buttons etc). This works fine in Visual Basic. When MS made access they did not make things easy with these Numbers and thus the FORM you see in access is not always the window. Thus the children are then hard to find.
What does this mean for you. Well you will have to find your object frame, THEN create a child, then draw your pictures with this child.
I may have oversimplified things here, but working with the Windows API and Access is really hard to understand. Stephen Lebans talks about these problems. I have tried to change forms with the API and was never really happy.
Maybe it is more trouble, but I have a feeling that it would make matters more flexible. Do you have in mind any Windows APIs that could be used to draw inside an Object Frame on a Form?
I have another 1/2 solution.
You could make your pictures on the fly.
Have a look at imagemagik
http://www.imagemagick.org/script/index.php
This is a library that you can use to manipulate images. But it also can create images like you want.
What I am thinking is that you have a set of base images of teeth, gums etc in your resources folder.
When a patient is called you move your base folder pictures to a temp folder, overlay with the use of imagemagik your rectagles or what ever you want and then show your newly created image on the form.
Once you close the patient the temp pics are deleted.
If you have a look in their forum I wrote a fairly long post (complaint/frustration). Support is almost zero for us kindergarten VBA'ers but I worked it out in the end.