Help With Complicated Request

O.V.Killer

Registered User.
Local time
Today, 20:48
Joined
Dec 27, 2008
Messages
13
Hi All

I Have Form This Form Included :
1- Vacation ID
2- Employee File No.
3- Vacation Begin Date
4- Vacation End Date
5- Vacation Days End , Show Me How Days That The Vacation Is Finish It Means: =now()-[Days End]
6- Check Box

& Another Form When There Is Some Employees That They Vacation Days End More Than 1 This Form Open


So What I Want Is: After Entering Data &etc & Receive The Warning About The Employee I Just Check The Check Box , All Data Saved & No More Get Warning Message For This Record

Could It Happen ?
 
If that checkbox is stored in the table itself as something such as... warning...then you could possible do this in VB with.

If me.warning = false then
If now()-[Days End] > 1 then
Display Message
End If
End if

So if the checkbox is not checked, it will then look to see if the criteria is met to display the message. If the checkbox is checked, then it will never display the message.
 
Could You Explain More For Me
Cuz Im Not So Good With Codes
 
Ok, I am going to assume that the checkbox is stored inside your table, and is located on the form.

I am not sure when exactly you want this error message to appear, so for now let's just put it at the end of them filling in "Vacation End Date".

Go into form design view, go into the properties of the Vacation End Date, go to the events tab, click on the three dots to the right, and click the "Code Editor" option.

Now type this:

If Me.Warning = False Then
If Me.txtDaysEnd.Value >= 1 Then
MsgBox "Vacation Days is 1 or More!"
End If
End If

Warning is the fieldname of the checkbox... txtDaysEnd is the name of the textbox with the calculated value. I am attaching an example database so you can see how this works.
 

Attachments

no no

I Have Already Form Called frm_Warning It The Warning Message That I Want To Apeer
& Its Apeer With No Problem
But I Want To Chek The Check Box So I Dont Get The Warning Message For This Record
& The Days End Dont Encreas
 
Can you use the same code as I suggested earlier,

Wherever the code is that makes your form open, just slightly edit it so that:

If me.warning = false then
Continue to open the form as normal
End if

This should stop the form from opening if the checkbox is checked.
 
Greeeat
A Just Put This Code In On Open Action
If Me.Warning = False Then
If Me.txtDaysEnd.Value >= 1 Then
MsgBox "Vacation Days is 1 or More!"
End If
End If
 

Users who are viewing this thread

Back
Top Bottom