vertical scroll bar display bug?

B

Bart

I am having a display issue with a form that I am using as a subform in
datasheet view. When run alone everything works fine but as a subform it does
not initially display a vertical scroll bar even though there are more
records than can be displayed in the space available. To see the other
records it is necessary to use the navigation buttons on the keyboard to move
down the list. Scroll bars will appear once navigation forces a row over the
top end but all records below the original set of visible records will not
show any dividing lines between rows.

This subform drives another subform that displays an image based on a value
found in the selected record of the above datasheet. I have narrowed the
problem down to the following function:

Function setImagePath()
' Hide the built-in navigation buttons
Parent.NavigationButtons = False

Dim strImagePath As String
On Error GoTo PictureNotAvailable
strImagePath = Me.smallImagePath + Me.photoNumV + Me.fileType
Me.Image16.Picture = strImagePath

' Turn the built-in navigation buttons back on
Parent.NavigationButtons = True

Exit Function

Commenting out the "strImagePath = " statement eliminates the problem but of
course is essential to my application.

Is there something wrong with this statement, or is there something else I
can do fix this problem?

Any help would be appreciated.

Access 2000
Windows XP
 
B

Bart

Marshall Barton said:
I fpn't think there's anything wrong with your code, even
though I can't see why you want to hide and then show the
nav buttons.

I suspect that displaying the picture is interfering with
processing the subform. The lack of dividing lines seems
like a sure indicator that the subform wan not completely
painted and the lack of the scroll bar might indicate the
subform's recordset has not loaded sufficiently.

The types of things you might want to try in an attempt to
shake this loose is one or more of:

Add some DoEvents statements before and/or after setting the
picture.

Add Me.RecordsetClone.MoveLast to the subform Load event.

Add a Me.Repaint before and/or after setting the picture.

Change the picture file to a simpler type (e,g. bitmap).

Associate the picture file type with a different rendering
program.
Thanks Marshall. I was hopeful the repaint event might be the fix,
unfortunately it wasn't, though I can't help thinking it should. Changing the
file type to .bmp did work however the image quality is very poor, at least
the way it is displayed in Access. The moveLast event did not make any
difference, nor did changing the default application associated with the file
type (though I am not sure that was what your were suggesting). I changed it
to the same application that is associated with the .bmp files (Windows
Picture and Fax Viewer). Does Access use the application defined for the file
type at the system level to display images? The rendering of .bmp files in
Access is much different than in any of the viewers I tried. Changing the
default application for .bmp did not seem to change its rendering in Access.

Hiding the navigation buttons on the parent window prevents the user from
advancing to the next record when an image was still loading which was
causing frequent crashes.

Thanks,
 
B

Bart

Marshall Barton said:
Did you try adding some DoEvent statement?

I think I would try using MSPaint to render bmp files.

Make sure you are using an image control to display the
picture.

Let's see if the picture quality can be improved by changing
the image control's SizeMode property to Clip. If the
picture's size is not close to the image control's size, see
if you can get the picture's original editing program to
resize it to the image control's size.
Yes I did try some DoEvent statements. They have not had any effect but I am
not sure that I am using them properly. I am not sure that I was using the
repaint method properly either. The display issue is in one subform while the
image control is another. Initially I was using me.repaint in the subform
with the image control. I have changed it to reference the other form instead
using "form_SAcrmPhotoDF.repaint" within the form that sets the image path
for the image control where "form_SAcrmPhotoDF" is the datasheet view subform
with the scrolling list of images. It is still not having any effect on the
display of the vertical scroll bars.

I tried setting MSPaint as the default application for .bmp but that did not
change the quality of the display of bitmap images in Access.

I am using an image control.

Changing the sizeMode to clip does clear up the image quality issue but as I
have both vertical and horizontal images to deal with I can't make them all
the same size (or maybe I could with adding some space to fill the image out
in the short direction). I guess I may have to look at doing that though I
can't help thinking that shouldn't really be necessary.

Thanks for your help Marsh,
 

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