Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / June 2005

Tip: Looking for answers? Try searching our database.

DCount Expression Help Needed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Elliott - 02 Jun 2005 01:02 GMT
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.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.