B
Bill
Dirk,
I noticed that I didn't answer an earlier question you
had about running a timer, to which the answer is no.
Well, I put begin/end debug statements in every sub
that runs when the "Details Form" runs. The "Sel"
values do not show being changed until the Close
event fires. AND, they are changed when the Close
sub BEGINS.
Anyway, with what I discovered with the Debug
insertions, I was led to think about what the code
might NOT be doing that could account for the
multi-RSH behavior. If you look at the SetImagePath
code below, notice that if what the code has determined
to be the fully qualified name and path of the "ImagePath"
is already set in the property sheet for the control, that the
code doesn't bother to set it again, which would seem
redundant and obviously why I coded it that way. However,
if I comment out the statement,
If Me.PicturePath.Picture = ImagePath Then Exit Sub
the seemingly now famous multi-RSH behavior ceases.
I looked at the property sheet for the image control in the
"Details Form" but don't see anything suspicious. The
"Picture" property contains the name and path of the
default image as originally coded.
I can't help but wonder if because the "Details Form" and
all of its controls were originally created with a screen
resolution of 800 x 600 that there's some elements of the
form's properties that don't adjust correctly if the form is
subsequently displayed at 1024 x 768.
I will proceed to create a simple continuous form with no
code in it but the Form_DoubleClick event as you suggested
earlier.
It's these goofy kinds of anomalies that keep me awake at
night. I hope this caper didn't do that to you too.
Bill
======(Sub SetImagePath=============================
Private Sub SetImagePath()
Dim ImagePath As String
Dim DefaultImage As String
Dim RegisteredImage As String
DefaultImage = IPImages & "\DefaultPic.jpg" 'We'll use the
default if no other specified
RegisteredImage = IPImages & "\" & [ImageID] & ".jpg" 'This won't
exist if ImageID is zero-length string
'See if we have picture other than the default picture.
If Dir(RegisteredImage) = "" Then
ImagePath = DefaultImage
If Len(ImageID) > 0 Then 'The ID is
specified, but there's no corresponding jpg file
MsgBox "There's no JPEG file corresponding to the name: " & ImageID
& " The image name is being reset."
ImageID = Null
End If
Else
ImagePath = RegisteredImage
End If
If Me.PicturePath.Picture = ImagePath Then Exit Sub
Me.PicturePath.Picture = ImagePath
DoEvents
End Sub
================================================
I noticed that I didn't answer an earlier question you
had about running a timer, to which the answer is no.
Well, I put begin/end debug statements in every sub
that runs when the "Details Form" runs. The "Sel"
values do not show being changed until the Close
event fires. AND, they are changed when the Close
sub BEGINS.
Anyway, with what I discovered with the Debug
insertions, I was led to think about what the code
might NOT be doing that could account for the
multi-RSH behavior. If you look at the SetImagePath
code below, notice that if what the code has determined
to be the fully qualified name and path of the "ImagePath"
is already set in the property sheet for the control, that the
code doesn't bother to set it again, which would seem
redundant and obviously why I coded it that way. However,
if I comment out the statement,
If Me.PicturePath.Picture = ImagePath Then Exit Sub
the seemingly now famous multi-RSH behavior ceases.
I looked at the property sheet for the image control in the
"Details Form" but don't see anything suspicious. The
"Picture" property contains the name and path of the
default image as originally coded.
I can't help but wonder if because the "Details Form" and
all of its controls were originally created with a screen
resolution of 800 x 600 that there's some elements of the
form's properties that don't adjust correctly if the form is
subsequently displayed at 1024 x 768.
I will proceed to create a simple continuous form with no
code in it but the Form_DoubleClick event as you suggested
earlier.
It's these goofy kinds of anomalies that keep me awake at
night. I hope this caper didn't do that to you too.
Bill
======(Sub SetImagePath=============================
Private Sub SetImagePath()
Dim ImagePath As String
Dim DefaultImage As String
Dim RegisteredImage As String
DefaultImage = IPImages & "\DefaultPic.jpg" 'We'll use the
default if no other specified
RegisteredImage = IPImages & "\" & [ImageID] & ".jpg" 'This won't
exist if ImageID is zero-length string
'See if we have picture other than the default picture.
If Dir(RegisteredImage) = "" Then
ImagePath = DefaultImage
If Len(ImageID) > 0 Then 'The ID is
specified, but there's no corresponding jpg file
MsgBox "There's no JPEG file corresponding to the name: " & ImageID
& " The image name is being reset."
ImageID = Null
End If
Else
ImagePath = RegisteredImage
End If
If Me.PicturePath.Picture = ImagePath Then Exit Sub
Me.PicturePath.Picture = ImagePath
DoEvents
End Sub
================================================