Microsoft Access kept hanging on when .Show was called the second time in an application. I created a simple example showing it either hanging or killing the Access 2010 program running windows 7.

Clicking the first button and then the second button kills the Access program (“Access has stopped working…”). Clicking the first button and then the third button hangs, and you have to use the Task Manager to kill the application.

Changing the argument in btnBrowse1_Click to msoFileDialogPicker makes it all work. Various combinations of declaring f as FileDialog throughout produces various results, not all of them successful.

Option Compare Database – Access 2010

Private Sub btnBrowse1_Click()
Dim f As Object
Dim varfile As Variant

Set f = Application.FileDialog(msoFileDialogOpen) ' Argument was supposed to be msoFileDialogPicker
    f.initialfilename = "*.xls"
If f.Show Then
    If f.SelectedItems.Count > 0 Then
        For Each varfile In f.SelectedItems
            txtFilename = varfile
        Next
    End If
End If

End Sub

Private Sub btnBrowse2_Click()

Dim f As FileDialog
Dim varfile As Variant

Set f = Application.FileDialog(msoFileDialogFilePicker)
    f.initialfilename = "*.xls"
If f.Show Then
    If f.SelectedItems.Count > 0 Then
        For Each varfile In f.SelectedItems
            txtFilename = varfile
        Next
    End If
End If

End Sub

Private Sub btnBrowse3_Click()

Dim f As Object
Dim varfile As Variant

Set f = Application.FileDialog(msoFileDialogFilePicker)
    f.initialfilename = "*.xls"
If f.Show Then
    If f.SelectedItems.Count > 0 Then
        For Each varfile In f.SelectedItems
            txtFilename = varfile
        Next
    End If
End If

End Sub

FileDialogTest Access 2010

For information about how Acumen can help with your Software needs, contact us today!

One of the Joomla sites we host recently fell victim to a hacker attack.

We implemented a couple of simple changes for common hacks and suggest that anyone else hosting a Joomla 1.5 site do the same.

Hack 1

There is a default Super Administrator in Joomla with the User ID of 62. It’s important to block this User ID. You can’t delete it. I’ll cover the way to block it now.

  1. Log-in as a Joomla Super Administrator
  2. From the Site Menu choose User Manager
  3. Check the User with the ID of 62
  4. Click Edit (you cannot delete this user)
  5. From the Group list choose a lower level Group like Registered (you cannot Block a Super Administrator so must demote them first)
  6. Click Apply
  7. Now select the Block User – Yes radio option
  8. Click Save

Your User ID 62 user is now blocked and this hack cannot be exploited anymore.

Hack 2

There are two important files and in this case on of those was changed by the hacker. These are the index.php file and the index2.php files. It is a good idea to change both of these to read only rather than writable. You will have to access to the root folder of the website as this is done through file management rather than the Joomla interface. Let’s see how to fix that.

  1. Access the root folder of you website.
  2. Right click on the file named index.php and choose Properties.
  3. Check Read Only
  4. Click OK
  5. Repeat steps 2 through 4 for the file named index2.php

This is certainly not an end solution to the hacking problem but it will deter some of the more common attacks on your Joomla website and we recommend all Joomla website administrators implement them immediately.

See our CMS Page and our Joomla Page for more ways we can help you!