Help with time tracking database

C

Chou

I will be working on this all night, so if you can stay on and help me out
that will be great. I really need to get this to work so I will be very
appreciative if you can stay on and help me out.

Thanks
 
K

Ken Snell \(MVP\)

What type of data field is EmpID field? If it's text, you need to delimit
the value with ' characters:

varTimeDate = DMax("TimeStampField", "TableName", "EmpID= '" & _
Me.EmpID.Value & "' And TimeStampField<#" & _
Format(Me.TimeStampField.Value, "m\/d\/yyyy h\:nn\:ss") & "#")
 
C

Chou

ya it is a text data type, what do I need to change in this code then :
varValue = DLookup("ClockIn", "TimeClock", "TimeStamp=#" & _
Format(datTimeDate, "m\/d\/yyyy h\:nn\:ss") & "# And SSN= " & _
Me.SSN.Value)
 
K

Ken Snell \(MVP\)

varValue = DLookup("ClockIn", "TimeClock", "TimeStamp=#" & _
Format(datTimeDate, "m\/d\/yyyy h\:nn\:ss") & "# And SSN= '" & _
Me.SSN.Value & "'")
--

Ken Snell
<MS ACCESS MVP>

Chou said:
ya it is a text data type, what do I need to change in this code then :
varValue = DLookup("ClockIn", "TimeClock", "TimeStamp=#" & _
Format(datTimeDate, "m\/d\/yyyy h\:nn\:ss") & "# And SSN= " & _
Me.SSN.Value)


< snipped >
 
C

Chou

Hi Ken,

How do you get the toggle button to pop back out. You told me to set it to
null, I've tried a few things but I can not get it right. Can you show me
how to do it.

So far I have put this command into the on click event so that the record
will submit.

DoCmd.GoToRecord , , acNewRec
 
K

Ken Snell \(MVP\)

As I noted earlier, you need to set the value of the option group control to
Null. The option group control is the control that houses the two toggle
buttons.

Here is some simple code:

Me.NameOfOptionGroupControl.Value = Null


Note that the default name for an option group control that ACCESS assigns
begins with Frame.
 
Top