Restoring the position of the Detail section of a form after adding multiple controls

RonB1949

New member
Local time
Today, 21:57
Joined
Nov 20, 2025
Messages
6
I am working on a database to manage my photo collection. I have a form with 32 image controls and associated textboxes. There are more controls than will fit in the Detail without scrolling. When I populate the image controls with images, the whole Detail section of the form scrolls down and hides the first images. How can I programatically restore the Detail to its topmost position?

Thanks in advance
 
Just to clarify - you have one detail section with 32 image controls? Or a detail section with one image control and 32 rows?

Where are the images coming from? Attachment? File name in a field pointing to a file on disk? Something else?
 
Sorry setting the focus to a textbox in the header doesn't work and it won't let me setfocus to an image - which seems a bit odd. Thanks
 
You can’t set focus to a number of control types including image - look a a controls events- does it have got/lost focus events?

Clarify my questions in post #2 and I might be able to offer an alternative suggestion
 
place a command button up top of your detail, set transparent to yes, and set focus to it.

buttonfocus.jpg


You can also try positioning the controls on the fly.
something like this:
 

Attachments

Last edited:
You can’t set focus to a number of control types including image - look a a controls events- does it have got/lost focus events?

Clarify my questions in post #2 and I might be able to offer an alternative suggestion
I have one detail section with 32 image controls. The images are loaded from disk via a table in Access. Each set of images comprises the photos I took on a particular day. The image names are in a table with 2 fields - directory (i.e. date) and file name
 
can you use webbrowser control?
see sample db in post #12 of this thread:
 
What if you have more than 32 pictures? And is the table one with 32 columns or so, one for each picture. Or more normalised with 32 rows ( however many actually required) of one picture each?

Given you appear to have a denormalised setup as an alternative to the transparent button suggested, try putting a blank textbox (visible but all dimensions set to 0 in the detail section) and in the form current event set the focus to this control
 
I am working on a database to manage my photo collection. I have a form with 32 image controls and associated textboxes. There are more controls than will fit in the Detail without scrolling. When I populate the image controls with images, the whole Detail section of the form scrolls down and hides the first images. How can I programatically restore the Detail to its topmost position?
Rather than having multiple image controls in the parent form you could have a single image control in a continuous forms view subform. This would enable you to scroll the images independently of the parent form. The attached little demo file illustrates this. In the demo each image path is stored as a separate row in an Images table. The many-to-many relationship type between this and the main Addresses table is modelled by an Addresses_Images table. Each addressee can therefore be associated with multiple images, and each image with multiple addressees.
 

Attachments

Users who are viewing this thread

Back
Top Bottom