473,395 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Playing & recording WAVE-type sound in MS Access - could Me!Message.Action = 7 value assignment differ if I'm using Access 2.0?

MLH

I've followed the instructions found on Microsoft's site...
http://support.microsoft.com/default...&Product=acc97

Here are those instructions...

To play and record sounds, follow these steps:
Create the following new table in Design view: Table: Messages
-----------------------
Field Name: Message
Data Type: OLE Object

Save the table as Messages, and then close the table.
Create a new form in Design view based on the Messages table.
Add the following controls to the form: Bound Object Frame:
Name: Message
ControlSource: Message

Command Button:
Name: RecordMessage
Caption: Record

Command Button:
Name: PlayMessage
Caption: Play

Add the following event procedure to the OnClick property of the
RecordMessage button: Me!Message.Class = "soundrec"
Me!Message.Action = acOLECreateEmbed
Me!Message.Verb = acOLEVerbPrimary
Me!Message.Action = acOLEActivate

Add the following event procedure to the OnClick property of the
PlayMessage button:Me!Message.Action=7

Switch the form to Form view.
To record a message, click the Record button to open the Windows Sound
Recorder.
Record your message, and then click "Exit and Return to Messages" on
the File menu. To play your recorded message, click the Play button.
Works fine in Access 95/97, but when I run it in Access 2.0, it pukes
on the Me!Message.Action = 7 line.

Anybody know why that may be? I know Access
2.0 is old and unsupported... etc, but so am I.
Nov 12 '05 #1
6 7405
get the PlaySound cod from www.mvps.org. That should work in Access
2. Check the modules section.
Nov 12 '05 #2
MLH
Hey thanks! I'll give it a shot.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 4 Nov 2003 23:10:44 -0800, pi********@hotmail.com (Pieter Linden)
wrote:
get the PlaySound cod from www.mvps.org. That should work in Access
2. Check the modules section.


Nov 12 '05 #3
MLH
Oh, well, as luck would have it. My search there for 'playsound'
turned up 5 hits, but none of them reeked of 16-bit stuff.
Unfortunately for me, I'm afraid. I couldn't specifically identify
the 'modules section'.

Thanks anyway, Pieter. I appreciate the suggestion.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx
Nov 12 '05 #4
sorry, got lazy. here's the full address for the PlaySound API function:

http://www.mvps.org/access/api/api0011.htm

not sure about recording...
Nov 12 '05 #5
MLH
Well, I tried it.
However, when this line ran...

lngRet = apiPlaySound(strFilename, intPlayMode)

Access 2.0 returned a msg saying "Error in Loading DLL"

I'll test this in Access 97 2C if the error occurs there.
Nov 12 '05 #6
Try this:
Dump this in a module (I called it basWav...) (watch for line-wrap)
Declare Function csvSndPlaySound Lib "MMSYSTEM.DLL" Alias "SndPlaySound" (ByVal FileName As String,
ByVal How As Integer) As Integer
Function csvPlayWave (ByVal FileName As String, ByVal How As Integer) As Integer
csvPlayWave = csvSndPlaySound(Trim(FileName), How)
'Example:
'Dim lngRetkode as long
'lngRetkode =csvPlayWave("c:\windows\media\tada.wav", 1)
End Function

Works in Access 2.0 on my PC ...

--
Hope this helps
Arno R
"MLH" <CR**@NorthState.net> schreef in bericht news:e4********************************@4ax.com...

I've followed the instructions found on Microsoft's site...
http://support.microsoft.com/default...&Product=acc97

Here are those instructions...

To play and record sounds, follow these steps:
Create the following new table in Design view: Table: Messages
-----------------------
Field Name: Message
Data Type: OLE Object

Save the table as Messages, and then close the table.
Create a new form in Design view based on the Messages table.
Add the following controls to the form: Bound Object Frame:
Name: Message
ControlSource: Message

Command Button:
Name: RecordMessage
Caption: Record

Command Button:
Name: PlayMessage
Caption: Play

Add the following event procedure to the OnClick property of the
RecordMessage button: Me!Message.Class = "soundrec"
Me!Message.Action = acOLECreateEmbed
Me!Message.Verb = acOLEVerbPrimary
Me!Message.Action = acOLEActivate

Add the following event procedure to the OnClick property of the
PlayMessage button:Me!Message.Action=7

Switch the form to Form view.
To record a message, click the Record button to open the Windows Sound
Recorder.
Record your message, and then click "Exit and Return to Messages" on
the File menu. To play your recorded message, click the Play button.
Works fine in Access 95/97, but when I run it in Access 2.0, it pukes
on the Me!Message.Action = 7 line.

Anybody know why that may be? I know Access
2.0 is old and unsupported... etc, but so am I.


Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ankit | last post by:
Hi This is what I beleive. Please tell whether this is true. Is it true that in xml we can have no text belonging to an element that has sub elements too? While in HTML this can be. for eg....
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
2
by: clojinted | last post by:
Hey, I'm trying to record a wave file in c#. There is a class mentioned on the sight called WaveIn that seems to do this. I'm new to .Net though and don't actually know how to go about calling the...
2
by: Sagaert Johan | last post by:
Hi I can play a wave file through a p/invoke to winmm , but how can i play a wave file to a specific audio device if i have more then one audio device in my pc ? Johan
0
by: Mad Scientist | last post by:
Has anyone been able to play back a mono WAV while recording, and saving the results as a stereo WAV (left channel = first mono recording, right channel = new recording)? Any sample code would...
6
by: CoreyWhite | last post by:
Convert WAV To BMP And Back On RentaCoder one of the coders thought I just wanted him to change the extension from WAV to BMP. Another coder brought up the complexities of actually converting...
2
by: rockdale | last post by:
Hi, all: I need to implement a recording functionality on my asp.net webpage. the rough idea is user click a button, then I start recording what the user speaked and then save it as a wave file...
5
by: RayD | last post by:
I'm looking for a simple program or method to generate sine waves or square waves at a desired frequency. Thanks for your help Ray
0
luke14free
by: luke14free | last post by:
Hello, I'm doing a project for a physics project and having some problem doing it. What I exactly need to do is to gain some audio from a microphone, analyze it and take its wave. Then i'd have to...
1
kudos
by: kudos | last post by:
There is alot of GUI packages for Python, but as far as I know the only one that "comes with python" is Tkinter. Here is a toy program that draws a funny shape ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.