Forms :: Pop Up Error Msg Box Sounds

Feb 28, 2015

how to get a "sound" to occur everytime a certain message box pops up.I wrote the following code which currently allows the MsgBox to open when the criteria is met, BUT it does not make a sound when opening. I followed the instructions as per this link URL....

Private Sub Open_frmAccessories_Click()
If (Me!txtProductGroup) = 9 Then
MsgBox "This Product Does Not Have Any Accessories", -vbExclamation, "NO Accessories for this Product"
Exit Sub
Else

[code]....

I have attached a copy of the pop up box to show it is working correctly, albeit without the sound function. Curiously, if I click on any button in the Products main screen behind the Error Msg box, i.e. "New" or "Close" the SOUND occurs at that point!

View Replies


ADVERTISEMENT

Sounds In Access

Apr 10, 2007

I have a 'display only' form, which updates a company's sales totals every five minutes. I would like to add a beep or other sound when the screen updates.
Is there any way to play a sound or beep from Access or SQL?

Robert

View 2 Replies View Related

General :: Mute Sounds In Database

Jun 19, 2014

So i am building a DB for my work and i am having alot of fun with it today and showing my geek/nerd side and putting a few sounds to give it some flair, good idea if the users can mute the sounds. what i have is a module with my sounds and then call fuctions where i want it to play, i have looked around but can't seem to find a way to mute, i was hoping for a button i could put on my login form to mute the sounds.

Option Compare Database
'************************************************* ****************
'Declarations section of the module.
'************************************************* ****************

Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal Filename As String, ByVal snd_async As Long) As Long
Public Function playwavefile(sWavFile As String)
'Purpose: Plays a sound.

[code]...

View 4 Replies View Related

Update Textbox Problem (Not As Simple As It Sounds)

Feb 6, 2008

Hello,
I am still wet behind the ears in regard to Access so your help and support is much needed.

I have created a form in Access where i am having trouble with a textbox. In short this box is called [Shift] i want it to be populated by the result the system returns in another Textbox which is called [Time], this box is set up as Time().
So below is what i need it to do when the Form is used.

Textbox: [Time] = (07:00 - 14:59) would return "Earlies" in Textbox: [Shift]
Textbox: [Time] = (15:00 - 22:59) would return "Lates" in Textbox: [Shift]
Textbox: [Time] = (23:00 - 06:59) would return "Nights" in Textbox: [Shift]

I have tried the VBA below without success in this task so i can only assume it is due to the fact that the Time field is system generated or the fact it is in time format:

Private Sub Time_AfterUpdate()

If Me.Time >= "23:00 And < 06:59" Then

Me. Shift = "Nights"

End If
End Sub


Any Help you give is much needed, Thanks

View 11 Replies View Related

Forms :: Form Working Properly Alone / But Gives Error When Combined With Other Forms

Jun 5, 2015

I have a form "NewMetalF" that has three combo boxes. The first one is used to choose "Precious Metal" or "Base Metal". The second one shows all the metals based on the first combo box. When I open the form in form view alone the combo boxes work flawlessly. I run the form "NewMetalF" within another form "NewExternalPartF" by clicking a button "AddMetal". When the button is clicked "NewMetalF" opens. The first combo box is selected, and when the second combo box is clicked the error "Enter Paramater Value" "Forms!NewMetalF!cboPreciousOrBase".

View 13 Replies View Related

Error Messages On Forms

Feb 7, 2005

I have a form with the text box "Project Name"

I have used a command button placed next to the project name box which if clicked opens up a finance details form for the project name box.

Problem is if that project does not have any finance details it still opens up the form but just comes up as totally blank.

Is there anyway i can get an error message to come up and say
"No matching data found for this project" when they click the command button to open up the finance form, but there is no finance data?

I have tried but unsuccessfully.

I entered this code

Private Sub Label75_Click()
On Error GoTo Err_Label75_Click
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Contract Filtered"

If Combo22 = "" Then
MsgBox "No Matching Data Found", vbExclamation

End If

stLinkCriteria = "[Project Number]=" & Me![ProjectName]
DoCmd.OpenForm stDocName, , , stLinkCriteria





Exit_Label75_Click:
Exit Sub

Err_Label75_Click:
MsgBox Err.Description
Resume Exit_Label75_Click

End Sub


But instead of not opening the blank form, it comes up with the error message and then opens the blank form.

Or if there is finance data for that project it comes up with the error box still and opens the form

Any ideas people?

Thank you please

View 11 Replies View Related

Forms :: Sum Error On Subform

Jul 29, 2015

I have a form that have a calculated field which generate a series of numbers. Correct and usuable numbers. Now, all I want to do this is to total (Sum)that numbers up at the Form Footer.. I have a Text Box control on the form footer for this. And formula on the Text box control is this.. =Sum ([Dhrs]*[Davg]). I got error everywhere on my form when I open the form..I have been trying using NZ Sum etc..

View 14 Replies View Related

Forms :: Error If Not Selected

Aug 14, 2015

List box named: lstEvents
and 2 forms
Main 1: frmEvents
2nd 1: frmEventsEdit1

I have the codeing from here URL....Now, the problem im having is, that for the shows I have this code:

Code:
ShowNames: ([ShowName] & " " & Format([StartDate],"mm-yyyy"))

That is so that each show has the month and year attached to the name, so its easier to find out when they were, from just looking at them in the list box.But, if I use the search that John (The OP of that link) then if I were to search for 2015, and try to open a show, it just opens to a blank frmEventsEdit1. Even though I currently just tell it:

Code:
DoCmd.OpenForm "frmEventsEdit1", , , "EventID = " & Me.lstShows

I would like two things.Either, to figure out why that isn't working, or 2, to get this If sentence im working on that goes like this:

Code:
If "EventID" = " " Then MsgBox "Error, please try again" Else DoCmd.OpenForm "frmEventsEdit1", , , "EventID = " & Me.lstShows

View 13 Replies View Related

Forms :: Error / You Can't Assign A Value To This Object

Dec 2, 2014

I'm building a simple database for storing records about books.

I'm currently working on one of the data entry forms. Part of this form is supposed to enable the user to add details about the book and the series that it belongs to (if it does belong to one).

The relationship is One-to-Many: One series can have many books. I've made the series part a sub form.

When I enter some data to test that it works, I get an error message when I try to add a new series using the sub form. It says:

"You can't assign a value to this object.
*The object may be a control on a read-only form.
*The object may be on a form that is open in Design view.
*The value may be too large for this field."

As far as I know there isn't anything wrong, so I'm not certain why this error message comes up. I think it may have something to do with the primary key being the AutoNumber data type, but I just click 'OK' and ignore it, and it works fine.

The database works as far as I can see, I just want the error message to stop appearing.

View 6 Replies View Related

Forms :: On Load Form Error

Apr 3, 2014

I have built a database which has a number of forms with a frm_PartNo subform in.When ever I click a button to load one of these forms I get the following error message: ECN Database v1.31 cannot find the referenced form 'frm_PartNo'. But when the form loads the sub form is there with all the related data !

View 5 Replies View Related

Forms :: Form Unload Error

Oct 7, 2014

I'm getting an error on some fairly simple code attached to a form's Unload event, but I'm only seeing it when I switch my form to design mode. My code does look like it's working under normal conditions,I've attached a simplified database that reproduces the problem in all its glory. I've searched for similar problems and solutions but none have quite hit the spot.

The code is supposed to prevent users closing a form if they haven't entered at least one record in the subform. In my attached example, you shouldn't be able to close the form if you are currently on a Person record that has no linked Hobby record. Do do this, I have used the following code in the Unload event of frmPerson:

Code:

Private Sub Form_Unload(Cancel As Integer)
If Me.frmhobby.Form.Recordset.RecordCount < 1 Then
Call MsgBox("you must enter at least one hobby for this person")
Cancel = True
End If
End Sub

To see it working properly, go to Person record 3 (Laura Blackwood) which has no Hobby records, and try to close the form. You can't close it until you have entered a hobby for this person. As far as I can see the code works as expected.

Now navigate to Person Record 4 (Mary McArthur). Instead of trying to close the form, switch the form to Design View. You will get the following error: "Runtime error 2455: You entered an expression that has an invalid reference to the property form/report". Return to Form view and navigate to record 2 (Kevin Petersen), then switch back to Design View - same error. Interestingly, you don't ever get the error on Record 1. All this is exactly what happens on my real database too.

So I'm worried that my code isn't right despite appearances. I thought switching to Design View just goes through the same Unload-Deactivate-Close routine as when you close a form in a conventional way? I also know that subforms unload after forms, so since the code is attached to the Form, the subform should still be available to it and shouldn't result in a reference error.

View 3 Replies View Related

Forms :: How To Intercept Error Messages

Mar 4, 2014

I have written the following code for checking whether a query exists.

Code:
Function QueryExists(strQueryName As String) As Boolean
'----------------------------------------------------------------------------------------
' Checks whether a query already exists
'----------------------------------------------------------------------------------------
Dim db As DAO.Database
Dim tdf As DAO.QueryDef
On Error GoTo err_handler
Set db = CurrentDb

[code]....

Here I try to intercept the error message in vain.

View 8 Replies View Related

Forms :: Error In Calculated Field

Feb 18, 2015

I have a simple access database which up until now was working as it should. Then i made a Backup of the database Named it something different deleted certain data from the backup and when i went back into the original DB i now have #Name? where it used to calculate 2 fields.

View 1 Replies View Related

Continous Forms Subform Error Message!

Jan 24, 2005

Continuous forms error.

Hi,

I have a database which displays one form as a subform of another form. Originally the subform was displayed in datasheet view, but now due to changes I am trying to make to the system I want to display this subform as continuous forms. Unfortunately in datasheet view, when a record of the main form has several records (ie enough to require scrolling down the list) in the subform I get errors when scrolling through these subform records.

The error message that access is displaying is "The Value you entered isn't valid for this field. eg you have entered text in a numeric field or a number that is larger than the FieldSize setting permits."

I thought ok, maybe the subform design was duff (I am taking over a system designed by someone else) and so created a new subform, but the error still occurs with a totally fresh subform. The error occurs even when viewing the subform on its own. With a lot of records displayed on screen in the continous forms view I get numerous occurances of the abopve mentioned error message box and access eventually crashes. Yet in datasheet view everything is fine.

It's incredibly annoying as I can't fathom out what is causing the problem and how to fix it and to go about what I am doing in another way (ie without using continous forms) will mean scrapping a whole days work. I also don't like to do things a different way just because I can't get it to work the way I'd like to.

If anyone has some solutions to this problem I would be eternally grateful!

Thanks in advance!

John

View 1 Replies View Related

Forms :: Making Directory - Runtime Error 13

May 25, 2014

I'm getting a runtime error 13 on this line of code. Its a piece of code to make a directory, but I cant see anything wrong!

Code:
strBackUpDogNameFolder = "c:GPandDetectionDogTrainingLogBackUpsandReports" & Forms![frm_Profile]![Discipline] " & Forms![frm_Profile]![DogName]"

View 8 Replies View Related

Forms :: Runtime Error On Changing Selection

Jul 14, 2015

I have a Main form (MainForm) with two subforms (SFormA, SFormB). These SForms are connected to the MainForm by a control (controlA) and connected to each other by a control (controlB) via an unbound control in the main form, in order to change data in SFormB according to selected record in SFormA. SFormB has an on current event procedure determined to show different things depending on the value of a bound control that changes every time I select a different record in SFormA. Everything works fine when Mainform and SForms first load.

But, when I select a record on SFormA I get a runtime error and everything stops, application closes and reopens, creating a safety copy. It seems to me that the on current procedure on SFormB causes this problem, because if I delete it no error appears (SFormB not showing what I want though). Funny thing is I have another database, same design, same structure, same procedures, (different objects and names of course) and it works perfectly alright. I even recreated the whole database still the same error.

View 14 Replies View Related

Forms :: Getting Error After Using Switch Board Wizard

Nov 2, 2014

I use the switchboard wizard to set up a switchboard. At the moment my main switchboard has 3 items and they are all set to 'open form in add mode' and they all point to the same form at the moment (which does exist).

When I try to go to form view of the switchboard I get the error 'The control name label1 is misspelled or refers to a control that doesn't exist'. Behind it I can see the form in form view and I can see there are the 3 menu items I would expect but when I close the error dialogue and the following 'close macros' dialogue' it goes back to design view. In design view I can only see one menu item (which seems to be a text box rather than a label) instead of 3. I changed it to a label but it didn't work.

View 1 Replies View Related

Forms :: Compile Error Opening Form

Jan 29, 2014

A receive a compile error when an OpenForm macro action is executed. The error message is: The form you referenced may be closed or may not exist in the database. Microsoft Access may have encountered a compile error in a Visual Basic module for the form.

How do I fix this compile error ?

View 10 Replies View Related

Forms :: Error Keeps Popping Up After Expression Is Deleted?

Jun 4, 2015

This error message keeps popping up no matter what I do. "Database can't find the field 'QuotationNumber' referred to in your expression." I tried to define a text box by using a DLookUp function, however that did not work. I deleted the function, and now this error message keeps popping up. I have searched everywhere for an expression with 'QuotationNumber' in it, and I cannot find it. What do I do?

View 7 Replies View Related

Forms :: Unrecognizable Database Format Error

Oct 25, 2013

I have an error Unrecognizable dataBase Format. I cant Delete, split or do anything to my db.

View 3 Replies View Related

Forms :: Error Message In Opening Form

Jan 21, 2015

when i want to open the database in an access database i have the following error. you have as the event property setting the expression entered when open.This expression has caused an error amppu (database name) can not find the form that is referred to

View 4 Replies View Related

Forms :: Error On Startup Due To Display Form

Aug 9, 2013

I have been building a new db in my personal drive at work which has been working perfectly, until I transfer it to the main network drive so that others can use it.When I try to open it, I now get an error saying that windows cannot access the file (code 0x80070002) - although it does in fact open it anway, eventually.

I have removed and re-instated various bits of code, and discovered that it's linked to the 'Display Form' function within Access Options > Current Database, that I have used to open the form 'Homepage' when the db is opened. When the dropdown is set to 'None', the db opens fine, but when a form is selected, the error occurs. I have tried using an AutoExec macro to open the Homepage form, but this generates the same error too.

View 4 Replies View Related

Forms :: Google Maps Script Error

Feb 13, 2015

We have a form with the web browser control which links to Google maps and jumps to that location on the map by the lat and long and updates as you jump to each record. (The control is on a form and is only used there) The map itself works however i get a script error every time i jump to the next record....

View 2 Replies View Related

Forms :: Error While Loading A Webpage With Form

Jun 7, 2014

I try to open a web page with a form in access 2007. During the loading of the page it shows me 2 security error messages.

I tried to change the properties in Activex and especially the Silent property from No to Yes but this is not possible. In the next restart of the form restores the original settings.

When i open the same page with Internet Explorer it doesn't show any error. I have attached the database example to see exactly what happening.

View 9 Replies View Related

Forms :: OLE Server Error From List Box Update

Jun 2, 2014

I have a form which uses a list box to select which record to display. The code is all generated by Access during form design. It is a method I have used numerous times inthe past in various database without problem (even in the current database I am developing).But for some reason on this one form I get the following error;-

"The expression After Update you entered as the property setting produced the ollowing error; A problem occurred while database was communication with OLE Server or Active X Control".

View 2 Replies View Related

Forms :: Like Command In IF Then Statement - Syntax Error

Jun 24, 2015

Can I use the Like command in an If Then statement? I'm getting a syntax error

If [Primary1Name] Like 'PO*' Then
MsgBox "You cannot use a post office box address. Use a residence address.", vbOKOnly, "Incorrect Address Information"
DoCmd.GoToControl "Primary1Address1"
Else
End If

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved