Thanks Al, i could not think where to put the code. I will put it in "on
exit" as you suggest. Its obvious now you have said it.
thanks again
:
Maax,
You actually solved your own problem with this "textual" statement...
I would like to have the button disabled if the STATUS field does not equal
"engineered" and the BOM field does not have a value in and finally the
LABOUR field does not have a value in it.
Just convert that same "logic" to an IF statement to exit the sub if any of those
conditions does not exist.
Private Sub SomeButton_Click()
If [Status] <> "Engineered" and IsNull([BOM]) and IsNull(Labour) Then
Exit Sub
End If
SomeDateField = Date()
' your code to send email here
End Sub
All 3 criteria must be met before the Date is set, and the Email sent...
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions
"Find a job that you love, and you'll never work a day in your life."
Hi Al, i added the line SomeDateField = Date() to the code i already had for
the email button. it works a treat ....thanks.
I would like to have the button disabled if the STATUS field does not equal
"engineered" and the BOM field does not have a value in and finally the
LABOUR field does not have a value in it. i can kind of picture the simple
code for this but not sure where to put it?
could you possibly help me (yet again)?
thanks
:
Maax,
It would have been helpful if you had provided the names of the button and the
date
field, so... I'll use my own names.
I'll also assume that the button and the date field are on the Main form...
Private Sub SomeButton_Click()
SomeDateField = Date()
' your code to send email here
End Sub
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions
"Find a job that you love, and you'll never work a day in your life."
Hello, i would like to have a date field update with the date that a button
is pressed. The button sends an email to a colleague to inform them that a
record is available for them to update with a price.
I will then create a report that will list the the records with the date i
sent the email and the date that the price is added and sent to the customer
(price sent is already a field within the form).
as usuall any help greatly appreciated.
regards