Hiding the "import" window

fulltime

Registered User.
Local time
Today, 22:35
Joined
Mar 24, 2006
Messages
56
Hi all, below are my codes to display bitmaps in a MS Access form by just inserting the path to the image.

Code:
Option Compare Database

Private Sub CH1_Pic_AfterUpdate()
         On Error Resume Next
         Me![ImageFrame1].Picture = Me![CH1.Pic]
         
      End Sub

Private Sub CH2_Pic_AfterUpdate()
         On Error Resume Next
          Me![ImageFrame2].Picture = Me![CH2.Pic]
End Sub

Private Sub CH3_Pic_AfterUpdate()
         On Error Resume Next
          Me![ImageFrame3].Picture = Me![CH3.Pic]
End Sub

Private Sub CH4_Pic_AfterUpdate()
         On Error Resume Next
      Me![ImageFrame4].Picture = Me![CH4.Pic]

End Sub

Private Sub CH5_Pic_AfterUpdate()
         On Error Resume Next
          Me![ImageFrame5].Picture = Me![CH5.Pic]
End Sub

Private Sub CH6_Pic_AfterUpdate()
         On Error Resume Next
           Me![ImageFrame6].Picture = Me![CH6.Pic]
End Sub
Private Sub CH7_Pic_AfterUpdate()
         On Error Resume Next
       Me![ImageFrame7].Picture = Me![CH7.Pic]
      End Sub
Private Sub CH8_Pic_AfterUpdate()
         On Error Resume Next
         Me![ImageFrame8].Picture = Me![CH8.Pic]
End Sub

Private Sub CH9_Pic_AfterUpdate()
         On Error Resume Next
        Me![ImageFrame9].Picture = Me![CH9.Pic]
End Sub

Private Sub CH10_Pic_AfterUpdate()
         On Error Resume Next
        Me![ImageFrame10].Picture = Me![CH10.Pic]

End Sub

Private Sub CH11_Pic_AfterUpdate()
         On Error Resume Next
         Me![ImageFrame11].Picture = Me![CH11.Pic]

End Sub

Private Sub CH12_Pic_AfterUpdate()
         On Error Resume Next
         Me![ImageFrame12].Picture = Me![CH12.Pic]
End Sub

Private Sub CH13_Pic_AfterUpdate()
         On Error Resume Next
       Me![ImageFrame13].Picture = Me![CH13.Pic]

End Sub

Private Sub CH14_Pic_AfterUpdate()
         On Error Resume Next
        Me![ImageFrame14].Picture = Me![CH14.Pic]
End Sub
Private Sub CH15_Pic_AfterUpdate()
         On Error Resume Next
    Me![ImageFrame15].Picture = Me![CH15.Pic]
End Sub
Private Sub CH16_Pic_AfterUpdate()
         On Error Resume Next
         Me![ImageFrame16].Picture = Me![CH16.Pic]
End Sub



Private Sub cmdSearch_Click()
    Dim strRef As String
    Dim strSearch As String
    
'Check txtSearch for Null value or Nill Entry first.

    If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
        MsgBox "Please enter the name of the string!", vbExclamation, "Invalid Search Criterion!"
        Me![txtSearch].SetFocus
    Exit Sub
End If
'---------------------------------------------------------------
        
'Performs the search using value entered into txtSearch
'and evaluates this against values in strSearch
        
    DoCmd.ShowAllRecords
    DoCmd.GoToControl ("String Name") 'txtSearch is the string name to be searched
    DoCmd.FindRecord Me!txtSearch 'find the record similar to the user specified string name
                                  
                                  
    [String Name].SetFocus
    strRef = [String Name].Text
    txtSearch.SetFocus
    strSearch = txtSearch.Text
        
'If matching record found sets focus in strSearch and shows msgbox
'and clears search control

    If strRef = strSearch Then
        MsgBox "Match Found For: " & strSearch, , "String Found!"
        [String Name].SetFocus
        txtSearch = ""
        
    'If value not found sets focus back to txtSearch and shows msgbox
        Else
            MsgBox "Match Not Found For: " & strSearch, _
            , "Invalid Search Criterion!"
            txtSearch.SetFocus
    End If
End Sub


Private Sub Form_Current()
         On Error Resume Next
         
         Me![ImageFrame1].Picture = Me![CH1.Pic]
         
         Me![ImageFrame2].Picture = Me![CH2.Pic]
                 
         Me![ImageFrame3].Picture = Me![CH3.Pic]
         
         Me![ImageFrame4].Picture = Me![CH4.Pic]
         
         Me![ImageFrame5].Picture = Me![CH5.Pic]
         
         Me![ImageFrame6].Picture = Me![CH6.Pic]
                  
         Me![ImageFrame7].Picture = Me![CH7.Pic]
         
         Me![ImageFrame8].Picture = Me![CH8.Pic]
         
         Me![ImageFrame9].Picture = Me![CH9.Pic]
                 
         Me![ImageFrame10].Picture = Me![CH10.Pic]
         
         Me![ImageFrame11].Picture = Me![CH11.Pic]
         
         Me![ImageFrame12].Picture = Me![CH12.Pic]
         
         Me![ImageFrame13].Picture = Me![CH13.Pic]
                  
         Me![ImageFrame14].Picture = Me![CH14.Pic]
         
         Me![ImageFrame15].Picture = Me![CH15.Pic]
                  
         Me![ImageFrame16].Picture = Me![CH16.Pic]
         
         [ID].SetFocus
         
  End Sub

Private Sub Command23_Click()
On Error GoTo Err_Command23_Click


    DoCmd.Close

Exit_Command23_Click:
    Exit Sub

Err_Command23_Click:
    MsgBox Err.Description
    Resume Exit_Command23_Click
    
End Sub


Private Sub Command36_Click()
On Error GoTo Err_Command36_Click


    DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer80

Exit_Command36_Click:
    Exit Sub

Err_Command36_Click:
    MsgBox Err.Description
    Resume Exit_Command36_Click
    
End Sub

the output is attached in the jpeg file. However, as u can see from the jpeg, when i move from 1 record to another, the importing picture from "path name" keeps appearing when loading and disappears after the record is loaded.. How can i prevent tat window from appearing?? thks..
 

Attachments

  • importing error.JPG
    importing error.JPG
    56.8 KB · Views: 147
i tried to hide the "import" window by setting focus to the form, however, it doesnt work.. anyone else w a better suggestion?

thks
FT :)
 
Make the following settings to the registry then restart the computer:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Graphics Filters\Import\JPEG\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Graphics Filters\Import\BMP\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Graphics Filters\Import\GIF\Options]
"ShowProgressDialog"="No"


Larry
 
Laurentech said:
Make the following settings to the registry then restart the computer:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Graphics Filters\Import\JPEG\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Graphics Filters\Import\BMP\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Graphics Filters\Import\GIF\Options]
"ShowProgressDialog"="No"


Larry

thks larry, but will the changes affect all my programs? i am actually looking at a solution within MS acess..
 

Users who are viewing this thread

Back
Top Bottom