What Event Do I Put The Message On?

Oct 12, 2004

Hi,

I have a form which has a list of actions on it. There are 5 fields to be filled in per action. A user can add a new action by clicking the arrow button to go to the next blank record. My problem is that there is one field which is required. At the moment, if I click off the record I have just entered, and I have not filled the field, I get a standard access message telling me the required property of the field has not been set to true because it contains a null value. Obviously this is fine for me, I know what to do but my users will not understand it. I need to trap the error and put out a simple message along the lines of 'Please Select a Classification'. I don't know on which event I trap the error. The problem is that they could click off the record at any point, i.e., they might fill in 2 fields then click off, or they might fill 4. So I want it to be trapped just before the record is saved to the database but only after the user has been given the chance to fill all the fields in. I don't want the message to appear after they tab from field 1 to field 2, if you get what I mean.

Any ideas on how I do this?

thank you!

View Replies


ADVERTISEMENT

Message Box And After Update Event

Oct 26, 2004

Hi

I have form with a series of text boxes in which users can edit the data that is populated in them. For one of the text boxes I want to add an after update event, so that if the user changes the value in the text box, a message window appears telling them to click on the submit button at the bottom of the form.

Does anyone know the code that I should use to make this message appear when the value in the text box is changed?

View 1 Replies View Related

Trap Event Name For Error Message

Sep 16, 2005

:confused:
I would like to trap event name where an error has taken place in.

I do not want to type in every event name by hand for each error messge.


Exit_Command27_Click:
Exit Sub

Err_Command27_Click:
Call ErrorLog(Me.Name, EventName, Err, Err.description)
Resume Exit_Command27_Click

View 2 Replies View Related

VBA - If Event Is True Then Outlook Message

Sep 12, 2014

I am trying to "silently" send an email if for instance an event is trigger. In this case, if the amount of X is less to the amount of Y then send an email to remind me to buy more from product X.

I will be using Outlook for this matter.

The .Body should read something like "Your reserves from "Product X" are reaching its minimum. Please buy more of it"...

View 4 Replies View Related

Forms :: Message Popup 30 Minutes After Checkbox Event?

Jul 18, 2014

I would like to have a message box popup 30 minutes after a user checks a checkbox (check5). I am thinking I would have to have VBA code to run on the After Update property of the checkbox but not sure what the correct code would be.

View 3 Replies View Related

Message On "AfterUpdate" Event:

May 2, 2006

I have a form with a field called "CCN" and what I need to do is have some sort of code that will look at the table "Application Data - NE" and check to see if there are any duplicate records for that CCN on the "AfterUpdate" function and if so; spit out an error message saying "CCN already exist; please try another".

Does anyone have any ideas on how to code this?

I know how to do the custom error message; I am just not sure how to have it check for duplicates before the rest of the form can be updated/before the record is saved.

View 3 Replies View Related

A New Event

Oct 28, 2007

Hi


I would like to make an event that occurs when the value in the textbox (unbound) is changed.
Can you please show me how to do it?


Thanks

View 1 Replies View Related

Which Event?

Apr 4, 2005

I have a form that has (among other things):

1) a delete button (to delete a record)
2) a Search Payee box (that lists all payee names)
3) an SSN text box

I have code in the "On Enter" event of the SSN text box that pops up a message box asking which way to format the SSN (regular or as tax id). This works fine when entering a new record.

I just discovered, however, that when I delete a record then this message box comes up as well and I don't want it to. Instead I want to use the code "srchPayee.SetFocus" after a record is deleted to move the cursor/focus to the Search Payee box so that the SSN message box does not invoke.

I've tried putting the "srchPayee.SetFocus" in events on the form and also on the delete button, but no matter what I do the SSN message box still pops up after the record is deleted. Which event can I put this code in so that after deleting the record the focus moves to the Search Payee box and the SSN message does not appear?

Thanks!
Laurie

View 9 Replies View Related

Which Event Should I Use?

May 20, 2005

Form1 has a sub form, Form2, which have a tab control with a number of tabs. One of them, Tab4, includes a sub form, Form3.

I have an SQL statement that I want to run (using DoCmd.RunSQL) when Form3 is shown on screen the first time, e.g. when Tab4 activates. I've tried OnClick for Tab4, OnActivate for both Form3 and Tab4 along with a dozen other events with no result. Maybe the problem is that the tab control is also in a subform?

Any suggestions?

View 2 Replies View Related

Which Event?

Jun 3, 2005

I have a combo box with 'yes' and 'no' as options. The default is 'no'. When a user changes it to 'yes', I need to make several text boxes visible on the form. Q. Would it be better to user the OnChange or AfterUpdate event and why?

View 2 Replies View Related

Help With Event Procedure

Apr 11, 2006

Can someone help? I am working on an event database (based on Microsoft 2003 event database template). At present when I register attendees, I can preview an invoice which is generated based on the information I have entered.

I have set up another option to preview a Letter of Confirmation based on this same principal. As I am "Visually Basic" challenged, I simply 'copied & pasted' the event procedure and made the changes as needed to ensure the correct report was opened (ie not the Invoice report but Confirmation Letter report).

However, when I click the button to open preview the letter, the "Print Invoice" box also opens up (as it does when previewing the invoice). I don't want this box to open as I don't need to enter any details.

Can someone please have a look at my VBA event below to see what I would need to delete to stop the "Print Invoice" box from popping up.

Private Sub LOC_Click()
On Error GoTo Err_ConfirmationLetter_Click
If Me![Attendees Subform].Form.RecordsetClone.RecordCount = 0 Then
MsgBox "Enter attendee and registration information before previewing the Confirmation Letter."
Else
DoCmd.OpenReport "ConfirmationLetter", acPreview, , "[RegistrationID]=" & Forms![Attendees]![Attendees Subform].Form![RegistrationID]
End If

Exit_ConfirmationLetter_Click:
Exit Sub

Err_ConfirmationLetter_Click:
If Err <> 2501 Then
MsgBox Err.Description
End If
Resume Exit_ConfirmationLetter_Click
End Sub


Many thanks for any help.
Kath Price
Auckland, New Zealand

PS - Below is the original 'Preview Invoice' event that I copied:
Private Sub PreviewInvoice_Click()
On Error GoTo Err_PreviewInvoice_Click
If Me![Attendees Subform].Form.RecordsetClone.RecordCount = 0 Then
MsgBox "Enter attendee and registration information before previewing the invoice."
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport "Invoice", acPreview, , "[RegistrationID]=" & Forms![Attendees]![Attendees Subform].Form![RegistrationID]
End If

Exit_PreviewInvoice_Click:
Exit Sub

Err_PreviewInvoice_Click:
If Err <> 2501 Then
MsgBox Err.Description
End If
Resume Exit_PreviewInvoice_Click
End Sub

View 2 Replies View Related

Need Help To Detect Event

Aug 19, 2005

Hello,
In an empty field how to detect that the RETURN key has been pressed, i don't know hot to differentiate the RETURN KEY and the field exit by clicking the mouse in an other field because in the 2 cases the value of field is set to "", is there a way to test VbKey in a field ?

This because i want to set my field to a default value only when i press RETURN and i don't want the LostFocus or Exit set my field to this default value if nothing has been typed in my field.
(I must precise that for some reasons in my form the KeyPreview is set to TRUE.)

Thanks in advance for help.
VINCENT.

View 2 Replies View Related

Where To Put My Event Procedure

Oct 18, 2005

In my database I track a program called Bridge. Once you open bridge you can have anywhere from 1 to 7 "Sessions". Each bridge is assigned a number IE LT175A. If there are mulitple sessions they are numbered LT175A, LT175B, LT175C etc. I have a check box in my database that shows if bridge is installed on that PC. If it is then my section for session numbers are visiable, if bridge is not checked then the session numbers section isn't visiable. I currently have my Event Procedure in the After Update section. My code works because if I unclick on bridge my sessions disappears. However when I go to the next record if bridge is checked then my sessions are visiable but on the next record where it isn't checked it still displays the session section. So it isn't adjusting itself from record to record. Does my code need to go someplace else or am I doing something else wrong?
Here is the code I have:(and it's under After Update)

Private Sub Bridge_AfterUpdate()

If Me.Bridge = False Then
Me.BridgeSession_1.Visible = False
Me.BridgeSession_2.Visible = False
Me.BridgeSession_3.Visible = False
Me.BridgeSession_4.Visible = False
Me.BridgeSession_5.Visible = False
Me.BridgeSession_6.Visible = False
Me.BridgeSession_7.Visible = False

ElseIf Me.Bridge = True Then
Me.BridgeSession_1.Visible = True
Me.BridgeSession_2.Visible = True
Me.BridgeSession_3.Visible = True
'Me.BridgeSession_4.Visible = True
'Me.BridgeSession_5.Visible = True
'Me.BridgeSession_6.Visible = True
'Me.BridgeSession_7.Visible = True
End If
End Sub

Thanks,

Rick

View 2 Replies View Related

Car Event | Few Errors

Jun 1, 2006

Hi all,

i have been sick for quite a while,But back on track now.In the past i was building a car event db and would like to finish it.I have checked it out and there seems to be a few errors that i can't remember anything about.

you must have outlook installed otherwise some missing references come up.also there seems to be a problem with the date on the invoice form,the backup section in utilites.

If someone could have a look and point me in the right direction it would be greatly appreciated.

The file is access 2003 format

View 1 Replies View Related

Click Event

Jun 7, 2006

I'm working with a database with employess info in access, When I click on an employees name in a form, I want to fire off another form with there info, what I have now it does nothing.

View 4 Replies View Related

On Close Event

Jun 8, 2007

I used the following code in the on close event of my form and it works when the value of [maingameformation.playid] is not previously entered but if there is already a value there it won't overide it? Is this possible to do?


Private Sub Form_Close()
[Forms]![gameentryfrm]![maingameformation.playid] = Me.playid
End Sub

View 4 Replies View Related

Event Procedure

Oct 20, 2006

In one of my forms, i have this event procedure:

Private Sub Gross_Com_LostFocus()
If Gross_Com.Value >= 1000 Then
Full_Com.Value = [Gross_Com] * 0.2
Else
Full_Com.Value = 0
End If
End Sub

Is it possible to put such code in a report and query? If so, how?

Thanks a million!

Cheers!
Sheila

View 2 Replies View Related

Event For Subform

Jan 21, 2005

I have a form with a subform.
I have an event on dbl-click on the subform's detail section, I want to display yet another form - frmDatePopup depending on a value in that subform.
frmDatePopup has an Eval(Forms!frmDates!Start) for criteria for my date field. The problem is that when I dbl-click on the subform's detail section, frmDatePopup comes up blank, as if it ignores the Eval statement.
Any suggestions on what I need to change to make this work?
Thanks.

View 2 Replies View Related

Missing Event

Feb 3, 2005

Hello,

I have just joined this forum so I apologize if this question has already been asked, although I did do a search first. Here is my question:

I'm reading the Microsoft Press book, "Microsoft Access Version 2002, Inside/Out" by Helen Feddema. On page 846, in talking about how to use Form Event Procedures, she shows how to open a form's object property then click on the event tab so that you can enter code for the appriate event procedure. Her event tab of the form properties sheet shows more events than my pc does for Access 2002 (my Access help shows I'm running version 2002). Her event tab starts with "On Current" then "Before Insert", "After Insert" then "Before Update" while mine starts with "Before Update". She shows many more events than what my PC has and I need to use some of the missing ones. Anybody have an idea what's wrong or what I have to do to get the missing events to show up on my PC?

Thanks,
BBinMO

View 2 Replies View Related

Timer Event

May 24, 2005

I'm looking for a code that close my databse when a user is unactive for a set time.

I've search the forums but nothing workked for me

Is there someone who already have a code for this or maybe can help me?

thanks in advance

View 1 Replies View Related

Form Event?

Jun 22, 2005

hi ,
i am new to access ,specially in designing forms .
I have two tables Table1 and Table2 .I have created forms ,Form1 and Form2 respectively.
now what i want is ...when i enter the value in Form2 ...Table1 filed should be updated.
Table1.field1=Table1.field1-Table2.field1
how can i perform this type of action ?

thanks

View 1 Replies View Related

Looking For A Master Event..

Aug 4, 2005

Hi there,

Is there an event for a form object, which is triggered whenever any control in that form is changed/altered?

I have tried the suspect looking ones, but to no avail.

Thanks!

View 1 Replies View Related

Need Help To Figure Out Where Event Came From

Sep 8, 2005

OK, this form has a series of buttons that lead to other forms or open up into reports. The problem is I can't figure out how they do that. On the click event procedure of one of the buttons it says =HandleButtonClick(1) .
This is NOT a macro.
I don't think it's a command button either usually those say [Event Procedure] in the click event.
I can't figure it out. Anyone have any suggestions please?

View 2 Replies View Related

OnCurrent Event

Sep 9, 2005

Hi all
I am using the OnCurrent event even to check various about the contents of the current record in a form and ask for additional data where necessary with InputBox, but if it finds missing data on the first record when the form is opened, it displays the box before the form is on the screen. How can I make it display the form first?
Fiona

View 9 Replies View Related

After Event Scan

Nov 3, 2005

By utilizing the search feature, I have discovered issues that are somewhat relative to what I need assistance with, however nothing specific. So here we go…

1.I have a table named tblManifest. Within this table is a text field named PRODUCT and a text field named ACTION (which is a YES or NO option). There are multiple records (duplicates are acceptable) stored within this table/field
2.I have a form named frmReceipts. Within this form is a text box named PRODUCT.
Here is my issue. Within frmReceipts & text box PRODUCT, the user will utilize a handeld scanner to scan a product id barcode. After the scan, I want the record to be added to a table named tblReceipts. This is I have.

My problem is with product identity and specialized treatment of specific product id’s. What I need is when the user scans the product id and that particular product id is flagged as YES within the ACTION field in tblManifest, I would like for a separate wav file to be played and a comment box to flash on the screen. This will alert the user that the product requires specialized treatment. The wav is located in C:My DocumentsTest.wav. If product is flagged as NO, then no wav should be played and no comment is displayed.

I would imagine that this is possible, however beyond my basic Access skills. Thanks in advance for any assistance.

View 9 Replies View Related

Which Form Event.......??

Nov 29, 2005

I am trying to set a form so ALL text boxes return Proper case. I can get this to work by placing the code on each text box calling a function.....

Private Sub Text0_AfterUpdate()
Dim ctl As Control

For Each ctl In Controls

If ctl.Tag = "*" Then Call Proper

Next ctl

End Sub
``````````````````
the module is
```
Function Proper()
On Error GoTo Proper_Err

Screen.ActiveControl = StrConv(Screen.ActiveControl, 3)

Proper_Exit:
Exit Function

Proper_Err:
MsgBox Error$
Resume Proper_Exit

End Function
`````````````
What I am trying to get to is to have the text box event...Private Sub Text0_AfterUpdate() ...... Be a Form event... So the code would apply to every text box on the form.
Tried it on different form events..... Cant get it to work. Any ideas????

Thanks

View 6 Replies View Related







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