TechGuise
asked on
Controls on a form not HIDING as they should
I have a simple form plays an audio file to ask a child a question. While the audio is playing I wanted to hide two images that represent a YES and NO for them to touch their answer.
My problem is when the code is in the same SUB as the audio file player, it won't hide it. It will UNHIDE them after the audio plays.... and I can use the exact same line by itself from a button and it works. (Me.Image19.Visible = False)
My problem is when the code is in the same SUB as the audio file player, it won't hide it. It will UNHIDE them after the audio plays.... and I can use the exact same line by itself from a button and it works. (Me.Image19.Visible = False)
Private Sub DinoImage_Click()
On Error GoTo ButtonError
Me.Image19.Visible = False
Me.Image20.Visible = False
Dim stID As String
stID = Me.ID.Value
sndPlaySound "C:\HospitalIntake\Audio\Q" & stID & ".wav", SND_ASYNC
Me.Image19.Visible = True
Me.Image20.Visible = True
Exit Sub
ButtonError:
DoCmd.Echo True
DoCmd.SetWarnings True
Dim stErrMSG As String
stErrMSG = MsgBox(Err.Description)
End Sub
ScreenShot.PNG
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks!
ASKER
I agree, most of the time switching ENABLE to false is good enough. But they're going to be handing these tablets to pretty small kids. Thought it better to just hide them while question is playing. Some of the questions are longer than others, didn't want them trying to answer before entire question has been read.
Thanks again.