Question Regarding Bob Larson's FE Updater

unluckytoe

Registered User.
Local time
Today, 12:32
Joined
Oct 14, 2009
Messages
43
Bob/Everyone:

I'm in love with Bob's FE auto updater. It has made my life so much easier. I just have one question.

When opening up the previous version, a window pops up along with a sound advising me to update to the next version. How do I change the sound? I have an access DB with funny sounds and would like to use one if possible. I have a feeling though that it's a system sound, but I just want to make sure...

Any thoughts?

Brian
 
In the code that you have on your main form taht pops up there is this part or code

Code:
 If strFE <> strFEMaster Then
        MsgBox "Your program is not the latest version." & vbCrLf & _
        "The front-end needs to be updated.  The program will " & vbCrLf & _
        "now close and then should reopen automatically.", vbCritical, "VERSION NEEDS UPDATING"

The beep comes from the vbCritical part...

Now, can you change that to some other sound??? I believe that comes from your system sound for a critical stop.. so if you change that, you can change the sound that happens
 
The sounds are computer specific that are set in the CONTROL PANEL > SOUNDS on the computer. It is totally independent of Access.
 
And thanks for the compliment about the tool. I appreciate that :)
 
Thanks for your input guys!

Darn...ohh well, system beeps it is...

Thank you Bob
 
You can play a music file if you want. Just keep it short.

Code:
'PlayWaveFile
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal filename As String, ByVal snd_async As Long) As Long
    
Public Function PlayWaveFile(sWavFile As String)
    
    If apisndPlaySound(sWavFile, 1) = 0 Then
        'MsgBox "The Sound Did Not Play!"
    End If
    
End Function
    
Public Sub PlayWaveFile_Cord()
    
    Call PlayWaveFile("C:\Windows\Media\chord.wav")
    
End Sub

You could add some custom "beeps" when your message box is called. I used to use this as an attention getter but it was kinda obnoxious so I stopped using it. These custom pitched beeps come out of the users internal PC speaker so they cannot turn them off!

Code:
'Beep(pitch,length) 'Beep 1000, 200
Public Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

[COLOR="Green"]'You can adjust the numbers to create your own sounds.[/COLOR]
Public Function Beep_Critical()
    Beep 1000, 100
End Function

Public Function Beep_Low()
    Beep 100, 50
End Function

Public Function Beep_Normal()
    Beep 500, 50
End Function
Then this is how you would use it...
Code:
Public Sub TestBEEPs()
    Call Beep_Critical
    Call Beep_Low
    Call Beep_Normal
    Call Beep_Critical
    MsgBox "Testing 1 2 3", vbCritical + vbOKOnly, "This is critical!"
End Sub
 
Resurrecting this older thread as maybe of use to others who like myself are just starting out with VBA.

I have been using Bob's excellent FE-Updater across the network and it works brilliantly so first of all my thanks to him to making this available.

My tip (and I appreciate this is probably an intuitive step for more seasoned programmers) is to include in the form caption the version number and application title by way of a Dlookup up to the version number in the tbl-fe_version.

I added a second field to the tbl-fe_version [frmCaption] and entered a value as "1" (without the quotes)

on my forms On current event I added:

Me.Caption = "Your project name here " & DLookup("[fe_version_number]", "tbl-fe_version", "frmCaption = 1")

as there will only ever be 1 row in the table tbl-fe_version the field value [frmCaption] will always be 1

This method saves me having to remember to change a static label on the form to the latest version number before creating the new FE Master MDE. Why display the version number?, well my users seem to like the visual confirmation that they are indeed running the latest incarnation of the project.

Hope this is of some use to someone.
 

Users who are viewing this thread

Back
Top Bottom