Forms :: Play Sound With Event On Open Form
Jun 7, 2015How can I play a sound with event On Open Form.
View RepliesHow can I play a sound with event On Open Form.
View RepliesI have to tables:
Table 1 contains "cases picked"
Table 2 contains "cases required"
i have a query with info populated from those 2 tables:field "results" shows the results of this calculation: "cases required"-"cases picked"="results".In this query I have a conditional format stating: If true, displays text "ok" and the field will be green, if false, displays text "alert" and the field will be red.
Then I have this query in a subform (a form within another form),I would like to have a code or a formula for this query, where it would play a sound if (and only in this case) the value of "cases picked" is bigger than the value in "cases required"
This is how it works, you open the main form, start using a barcode scanner to scan cases, everytime you scan each case, the subform is refreshed and adds cases, and shows results, and shows how many cases you are missing or how many cases you are over, but this is only in the screen, i would like to have a sound in this subform, so in case you pick more cases than required, a loud sound is played as an alert, i still can't figure out where to put the solution, if as a formula in the query, or a code in the subform.
Is it possible to play any kind of sound file from Access?
View 1 Replies View RelatedI want to add a sound (not beep but a small wav) to an event in a form.
View 2 Replies View RelatedI need to close a form after checking a condition in the Form_Open event.
I expected that by setting Cancel = True that the form will close but this does not happen.
DoCmd.Close also does not close the form.
I have some code on a button that opens a form and changes the caption of a label:
Code:
DoCmd.OpenForm "frmRepair", , , , , , "CancelNo"
Forms![frmRepair].Form.[lblmain].Caption = "Missing Parts"
This code works well and frmRepair opens with the updated label caption. The original value was "Return/repair Information"
A few other things need to change on frmRepair depending on this caption as well as the values of some other fields, so I use the following code in the onload event (although I later tried the onopen even)
Code:
'Disable labels button if there is no RMA and the item is a repair
MsgBox Me.lblmain.Caption
If Me.lblmain.Caption = "Return/Repair Information" Then
Me.txtRMA.SetFocus
MsgBox Me.txtRMA.Text
[Code] ....
However, I cannot get this to work as the "if" statement always returns "Return/Repair information" and not the modified caption. The message box confirms that this is the case.
I suspect that this has to do with the point in time that the frmRepair loads or opens and when my code enters the modified values.
I have a table that holds the SQL texts for ca. 1000 Select queries (mostly minor variants that are used to programmatically swap out RowSource strings for combo boxes). I'd like to have a quick and easy way to open/review/modify these queries.
One strategy would be to display the SQL strings in a field on a Datasheet form, then use an onClick event on a text box linked to the SQL-holding field (or perhaps an onClick event tied to an unbound text box on the form) to open the associated query. That would allow me to view the SQL of the query that I want to open, allow me to quickly scroll through the list of stored SQL texts, and give me options for sorting or limiting the SQL-texts displayed in the datasheet form.
But, I can't seem to get the onClick event to work. The problem seems to be that I can't figure out how to pass the SQL string contained in the field to a function that will use that string to open the query .
Making a small database, Got 1 Table.
1. ContactDetailTable
Got 3 forms.
1. ContactIDForm
2. ContactInfoForm
3. NewContactFrom
In ContactIDForm it contain 1 textbox name 'TextBox' with Button Name 'Btn'
In ContactIDForm there is only 1 Text Box ContactIDTextBox and 1 Button. User Enters ID in TextBox and On Button Click Event it should check data from TextBox in Table name (ContactDetailTable) in field ContactID and if there is record matching, ContactInfoForm should Open else NewContactForm should open with ContactIDTextBox value in it.
I'm trying to open a form based on another form and have the following code in the Open Event:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_FormOpen
Dim strForm As String
strForm = "frmProductionBatch"
If IsLoaded(strForm) Then
Me.ProductName = Forms![frmProductionBatch]![ProductName]
Me.BatchNum = Forms![frmProductionBatch]![BatchNum]
Else
End If
Exit_FormOpen:
Exit Sub
Err_FormOpen:
MsgBox Err.Description
Resume Exit_FormOpen
End Sub
It works however I get an error message stating that I cannot assign a value to this Object?
What is going on here?
I've taken a break from Access for a while, but I'm back at it again and having some difficulty. I am trying to open a form with a timer to state that the database is going to shut down in five minutes if they don't respond. I'm obviously using the wrong code. I've been trying to use the following:
Private Sub Form_Timer()
DoCmd.OpenForm "frmWarning"
If Forms!frmHidden!chkActive Then
Forms!frmHidden!chkActive = False
Me.TimerInterval = 300000
Else
DoCmd.Quit
End If
End Sub
It crashes on the 'DoCmd.OpenForm "frmWarning"'
i have a series of short Avi films( they can be converted to another format is better suggestion) that are basically a tutorial films on how to use my database...
what i want is a form to have a list of these files so the user can choose which one to play the file within Access as a tutorial section...
Can this be done, if so anyone fancy helping me with this one please.
Cheers
Andy
I have code for a button click event. Essentially I have a main table form that I use to enter customer data and info. I also have a button that I use to add that customer to a separate table that I use for special Customers. My code copies all the data I need copied to my other table, so I wont waste space here typing my code that actually copies the data to the new table. What I will list are the two commands I am using after that code, to close the current form (the one with the button) and open the form for entering special customer information (the form to edit data on my other table). It works flawlessly, but when it opens the other form, it opens to the first record. I want to know how to make it open to the record which I was viewing when I clicked the button to copy the data.
DoCmd.OpenForm "Special Customer Data Entry", , , Number = Me.Number
DoCmd.Close acForm, "Customer Data"
Greetings:
This is a new area for me and I am struggling with how to approach the solution. Have searched the archives but still can't figure it out....
I have a database that stores call center coaching events. I would like to insert a wav file (recorded conversation) into each record and be able to play the wav file when the record is current in the form.
Any guidance or suggestions would be greatly appreciated.
Thanks!
John
Hi,
Friend I am bigner in ms acess I have datbase .
I want when I load main page sound/music .
when i open another page I want another soundplay that music
.
Plz ur help
Thanks from Iraqi
how can i automatically play sound files in forms i still use access 2.0
View 1 Replies View RelatedI have a report that tracks scores for our employees. From the report, you can click a button to add a new score in a form or edit an existing score(frmscoretracker). On this form there are two subforms, in a tabbed control to track additional information about the score; what areas were marked down(Trends), and was it a failing score(AutoFail).
When this form opens I have it programmed to only show the subform if there is data in it. The goal being, if I am adding a new score and there is no existing trends or Autofails for this new record, neither subforms will show - I will add an after update even to show either trends or autofail depending on the score recorded. Also, if someone chooses to edit the score, whatever subform with data, will show as well.
When someone clicks to add a new score, opening this main form to a new record, both of the tabs show. However, if the form opens to an existing record, the appropriate tab shows. Here is the code
Code:
Private Sub Form_Open(Cancel As Integer)
'If the subform has a record, the tab is visible, if not, the tab is not visible
If Me.frmtrends.Form.Recordset.RecordCount > 0 Or IsNull(Me.Trends) Then
Me.Trends.Visible = True
Me.TabCtl33.Visible = True
Else
Me.Trends.Visible = False
End If
[code]...
Both tabs are set as not visible in the default settings. Is there something in this code that is triggering then to be visible when there is no record in the main form?
I have some code for a button on click event to open a form and select the record which corresponds to a value in an unbound text box. The code is:
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmOpenPatientRecord"
[Code] ....
This works fine when I put in a 10 digit NHS number but opens a blank record when I enter a four digit or six character/digit PatientNumber. Both patient number and NHS number are text fields in the underlying table.
Hello,
I'm working on a splash screen to spruce up the opening of one of several databases I've created. I hate for them to appear boring so I like to add a bit of color at the beginning, a la Northwind's.
I haven't found anthing on this yet so I thougt I'd ask...
How can I have a sound I've downloaded from clipart or somewhere, PLAY when the form opens or loads or whatever...
Thanks in advance!
Goh
Is it possible to have a set sound play when a form is opened? And if so does anyone no how it is done?
Thanks in advance for any help
Nothing else to explain really. How can I get my database to make a beep sound when something is trying to be typed into a locked textbox control?
This is so that my users can know that it's locked (much like when the delete button is pressed on a new record).
Hello, I am trying to find a way to open a form with a subform on a specific record (for the form and the subform), I came up with the following but keep getting a mismatch mistake which means me think I am not doing it right.
What would be the apropriate way to achieve what I am trying to do?
Dim stDocName As String
'To Link to 1) Drawing File ID on main form
Dim stLinkCriteria As String
'To Link to 2) Drawing ID on subform
Dim StLinkCriteria2 As String
stDocName = "FrmDrawingDetail"
stLinkCriteria = "[DrawingFileID]=" & Me![DrawingFileID]
StLinkCriteria2 = "Forms!stDocName!SFrmDrawingDetail.Form!TxtDrawingI D=" & Me![DrawingID]
DoCmd.OpenForm stDocName, , , stLinkCriteria And StLinkCriteria2
I have a form in which job times for individuals is entered. As the data is entered, a macro fires to calculate various costs (Nat Ins/Pension/Total cost etc etc), and that data is stored in a table.
I now have written code to enable the inputting of the data into the database directly from the Excel sheet in which the data is first entered - this is great as it cuts out a data entry repeat and will be a big big time saver.
when i open a form i want to open another frm at the same time. i have a main form with some buttons in it. when i click on a button and a form opens then i am not able to click on a button to open other forms from the main form.
View 2 Replies View RelatedI have a continuous form with a button 'Cmd1' & a textbox 'txtMail' which is set to visible no.
When the user clicks Cmd1 - then txtMail becomes visible.
I can do it using vba on the buttons click event but when it executes txtMail for all the records become visible.
How do I use a button's click event on the form's current record - Private Sub Form_Current() so that when the user clicks Cmd1 on the current record only txtMail for that record becomes visible.
I'm using Access 2007.
I've got a DB, which has 3 forms ( all 'under' 3 navigation buttons/tabs ). The main form ( Client's form ) is set to show first, and currently has a recordsource of about 1350 records. I think the size of the recordsource, and the fact it 'loads' the other two forms all 'in one go', is slowing it down ( between 5 and 10 secs. to load ).
I read I should set the Visible properties of forms, not shown immediately, to false, only setting them to True in the On_Load event - when Tab is selected. Ideal I thought. However, I can't find this property in the Form's property sheet.
I am having problems with my subform. I have a table that has events with dates. When I create a subform with eventnames, it shows up. However, I cannot get the eventdate to populate in the case form.
I have attached the database ...