Duane,
I changed the code to match my table name and field names.
The problem I have is a "Runtime error 3078 Microfost Jet
database engine cannot find the table or query
tblINMATE_RECORD. Make sure it exists and it is spelled
correctly".
This is what I have in the visual basic editor:
Private Sub Option98_Click()
Dim strSQL As String
strSQL = "UPDATE tblINMATE_RECORD SET [DUTY_CHRONO_DATE]
=Date() WHERE [Duty_Chrono] =True"
DoCmd.RunSQL strSQL
End Sub
What do you think?
Dennis
-----Original Message-----
The code would be:
Dim strSQL as String
strSQL = "UPDATE tblYourTable SET [SomeField]=Date() WHERE [Duty Chrono] =
True"
DoCmd.RunSQL strSQL
--
Duane Hookom
MS Access MVP
What ever way is the cleanest giving the least
posibilities for problems later. I think code?
Thanks,
Dennis
-----Original Message-----
This is the SQL view of a query. You can run the query
from code or macro
(yuk) or database window. How do you want this to be run?
--
Duane Hookom
MS Access MVP
message
I recognize this is code and is to be placed in a module
but do I place it in a new module or in the module in
the
Form? Once in a module, how do I make it fire? Is there
an
Event procedure I should invoke?
Thanks,
Dennis
-----Original Message-----
UPDATE tblYourTable
SET [SomeField]=Date()
WHERE [Duty Chrono] = True
--
Duane Hookom
MS Access MVP
message
I am trying to update a field with a current date if
another field is "Yes". I tried to make this happen
by
using the following expression: =IIf([Duty Chrono]
=Yes,"Date()","00000000") needless to say this did
not
work. How can I make this happen?
Thanks Dennis
.
.
.