I have my main for named TimeCards and on it is a sub-form named Time and
Hours
On the main for there is a control named Rate which shows the customers rate
On the sub-form there is a control named EmployeeID which looks up the
employee fore the TimeCard
If there is only (1) One employee on the job,then I need to adjust the Rate
on the main form to
Text430 which is on the main form *2
This needs to requery so that if more than one (1) employee is added , then
it does nothing and lets the normal
code run.
On the main form on the after update event this code runs to change the Rate
to be what it should be when a customer is added.
Rate = [Text430]
I guess I need an else statement to put it back to Rate = [Text430] when
more than (1) employee is added to the Time and Hours form.
If DCount([EmployeeID], "Time_Hours", [EmployeeID] < 2 ) Then
Rate = [Text430] * 2
End If
Dave Elliott - 02 Jun 2005 01:33 GMT
Tried this as well with no success.
If Forms!TimeCards![Time_Hours].Form![Text95].Value < 2 Then
Rate = [Text430] * 2
Else
Rate = [Text430]
End If
>I have my main for named TimeCards and on it is a sub-form named Time and
>Hours
[quoted text clipped - 18 lines]
> Rate = [Text430] * 2
> End If
fredg - 02 Jun 2005 03:00 GMT
> I have my main for named TimeCards and on it is a sub-form named Time and
> Hours
[quoted text clipped - 17 lines]
> Rate = [Text430] * 2
> End If
Each argument must be a string.
If DCount("*", "Time_Hours","[EmployeeID] < 2") Then
etc.

Signature
Fred
Please only reply to this newsgroup.
I do not reply to personal email.