Neil - you are brilliant! Thanks, it works like a charm!
Clayton --- In [email protected], "Squires, Neil" <[EMAIL PROTECTED]> wrote: > > See if this helps. > > If IsNull(Forms![SCANFORM]!StartTime) Then > Forms![SCANFORM]!StartDate.SetFocus > Forms![SCANFORM]!StartDate.Value = CStr(Date) > Forms![SCANFORM]!StartTime.SetFocus > Forms![SCANFORM]!StartTime.Value = CStr(Time) > MsgBox "Start Time on This Process Has Been Accepted!" > > Else ' This line no longer has the : character > ' Forms![SCANFORM]!StartTime = Not Null ''' this line commented out > Forms![SCANFORM]!StopDate.SetFocus > Forms![SCANFORM]!StopDate.Value = CStr(Date) > Forms![SCANFORM]!StopTime.SetFocus > Forms![SCANFORM]!StopTime.Value = CStr(Time) > MsgBox "End Time on This Process Has Been Accepted!" > End If > > Also, I would store the date/time in a single field. > > me.txtStartTime = now() > > This line will get you your date and time with one command and you can parse them out with the format command when you need them later. > > Hope this helps. > > Neil Squires > > > > > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] Behalf Of brazilianbound > Sent: Tuesday, December 06, 2005 2:53 PM > To: [email protected] > Subject: [AccessDevelopers] If Statement help again! > > > Everything is working well, but when i scan the doneby for the End > time, it wipes out my StartTime field. > > Any idea why? > > Private Sub Doneby_AfterUpdate() > If IsNull(Forms![SCANFORM]!StartTime) Then > Forms![SCANFORM]!StartDate.SetFocus > Forms![SCANFORM]!StartDate.Value = CStr(Date) > Forms![SCANFORM]!StartTime.SetFocus > Forms![SCANFORM]!StartTime.Value = CStr(Time) > MsgBox "Start Time on This Process Has Been Accepted!" > > Else: Forms![SCANFORM]!StartTime = Not Null > Forms![SCANFORM]!StopDate.SetFocus > Forms![SCANFORM]!StopDate.Value = CStr(Date) > Forms![SCANFORM]!StopTime.SetFocus > Forms![SCANFORM]!StopTime.Value = CStr(Time) > MsgBox "End Time on This Process Has Been Accepted!" > End If > > > End Sub > > > > > > > > > Please zip all files prior to uploading to Files section. > Yahoo! Groups Links > ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/q7folB/TM --------------------------------------------------------------------~-> Please zip all files prior to uploading to Files section. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AccessDevelopers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
