C
Cybert
I have a database with about 100 records. There is a 95K .jpg file
that accompanies each record. Embedding or linking to these images
made my database too large, so I put a picture object in my form and
I'm loading the images that way. Here's the code:
------------------------------
Private Sub Form_Current()
On Error GoTo Err_Form_Current
If Forms!Pogo_Form.CurrentView = 1 Then
Forms!Pogo_Form.screen.Picture = Left$(CurrentDb.Name,
Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name))) & "Screens\" +
Me.GameName + ".jpg"
End If
Exit_Form_Current:
Exit Sub
Err_Form_Current:
Forms!Pogo_Form.screen.Picture = Left$(CurrentDb.Name,
Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name))) & "Screens\" +
"no_image.jpg"
Resume Exit_Form_Current
End Sub
------------------------------
Everything was working fine until I tried to post my database on the
network. Now, the picture loading is so slow that when users advance
through the records too quickly (before the images have had a chance to
load) the little import image bar that comes up is getting "stuck" on
the screen. (It won't go away, even when I hit the "x" and cancel.)
When I quit out of Access there is a crash.
I'm pretty new to VBA programming so any tips or suggestions would be
greatly appreciated.
that accompanies each record. Embedding or linking to these images
made my database too large, so I put a picture object in my form and
I'm loading the images that way. Here's the code:
------------------------------
Private Sub Form_Current()
On Error GoTo Err_Form_Current
If Forms!Pogo_Form.CurrentView = 1 Then
Forms!Pogo_Form.screen.Picture = Left$(CurrentDb.Name,
Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name))) & "Screens\" +
Me.GameName + ".jpg"
End If
Exit_Form_Current:
Exit Sub
Err_Form_Current:
Forms!Pogo_Form.screen.Picture = Left$(CurrentDb.Name,
Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name))) & "Screens\" +
"no_image.jpg"
Resume Exit_Form_Current
End Sub
------------------------------
Everything was working fine until I tried to post my database on the
network. Now, the picture loading is so slow that when users advance
through the records too quickly (before the images have had a chance to
load) the little import image bar that comes up is getting "stuck" on
the screen. (It won't go away, even when I hit the "x" and cancel.)
When I quit out of Access there is a crash.
I'm pretty new to VBA programming so any tips or suggestions would be
greatly appreciated.