in range and pause

J

Jason

is there a if inrange (0,15,30,45) function instead of using if a=0 or
a=15 or a=30 or a=45?

how do i hove two sounds one after the other without the second one
cutting off the first?

is there a better way for pausing:

fld = now()
while fld + timeserial(0,0,5) > now() 'delay 5 seconds
wend
 
M

Marshall Barton

Jason said:
is there a if inrange (0,15,30,45) function instead of using if a=0 or
a=15 or a=30 or a=45?

In VBA:
Select Case x
Case 0,15,30,45
...
Case Else
'oops
End Select

In a query or control expression:
x IN(0,15,30,45)
how do i hove two sounds one after the other without the second one
cutting off the first?

Most sound playing techniques have a wait till done option
http://www.mvps.org/access/api/api0011.htm
is there a better way for pausing:

fld = now()
while fld + timeserial(0,0,5) > now() 'delay 5 seconds
wend

The least you should do is put a DoEvents line in the loop.

The better way is http://www.mvps.org/access/api/api0021.htm
 
J

Jason

thanks for the help. My code is different:

Const SND_ASYNC = (0) 'wait until finish (was 1)

LResult = sndplaysound(SoundFile, SND_NODEFAULT + SND_ASYNC)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top