×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Document Window problem

Document Window problem

Document Window problem

(OP)
I have used Paul Bent's methot of viewing jpeg images successfully for a single form. However I have a smaller image which I wish to display on a different form. Accordingly I copied the code to another Script changing all the parameters so that the correct image etc was selected in the second Script. The Scipts function correctly if run from a button with the script attached to it on both forms.

However the small image does not change on Record Change in its form whereas the original image on its form does. I understood that this was controlled by the DocWindow and amended Paul's code accordingly as shown below. My question is why does the small image not change when the Record Changes?

Sub Newrecord(Source As Docwindow)

On Error Goto ErrTrap

'DocWindow object represents the active window
'Test for the view name else the code will try to fire on every view
If CurrentView.Name = IMG_VIEW_NAME Then
LoadImageFromFile
Elseif CurrentView.Name = SIMG_VIEW_NAME Then
LoadSImageFromFile
End If

Goto ExitSub

ErrTrap:
Msgbox "Error " & Format$(Err, "#0") & " - message: " & Error$, 16, "System Error"
Resume ExitSub

ExitSub:

RE: Document Window problem

(OP)
Found the problem.  Since the form showing the smaller image contained a repeating panel, this prevents the DocWindow events relating to Paul Bent's scipt firing correctly.  So I moved the repeating panel to another form and everything relating to the smaller and larger images works correctly.

But thanks for the posting!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close