On 15 Aug 2006 17:13:21 -0700,
(E-Mail Removed) wrote:
>Current code that I'm using is:
>In the Control Source of the "Start Time";
>=IIf(IsNull([Clock In]),Null,IIf(IsNull([Main]![Topaz Start
>Time]),Now([Main]![Topaz Start Time]),[Main]![Topaz Start Time])
>
>Now, this code (at least to me) should work. In essance, it should
>check to see if [Clock In] is null, if it is, then enter no
>information, if it isn't null though, then check to see if the record
>[Main]![Topaz Start Time] is null, if it is, then fill in the record
>with the current time, if the record isn't null, then return the
>record. But it seams that I've gone astray somewhere with this
>formula. Could anyone offer me some hints? Thank you all!
>
>-Matthew
For one thing, it's far more complex than it need be. You can use the
NZ() function instead. For another, the Now() function returns the
system clock time - it doesn't take any arguments (you're trying to
pass it the form reference). For yet another, you don't need to - and
shouldn't - use the form name in this way; if the code is on form Main
you need only use the control name, or you can use Me![Topaz Start
Time], or you can use [Forms]![Main]![Topaz Start Time] - but not just
[Main]!...
Finally, this code will DISPLAY a time value, once it gets corrected -
but it will not cause that value to be stored in any table field. The
Control Source is a calculated expression, not bound to any table
field.
So: what *are* the relevant fields in your Table, and to which form
controls are those fields bound (as Control SOurce)?
John W. Vinson[MVP]