Re: DCount Code Problem ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Re-sent this morning. 05/16/ @ 10:20am

"Van T. Dinh" <VanThien.Dinh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:e4YiFmgWFHA.1508@xxxxxxxxxxxxxxxxxxxxxxx
> Dave
>
> I got you message enquiring whether I got your file (which I didn't) and
> when I replied, the e-mail bounced back undeliverable.
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
>
> "Dave Elliott" <mynotebook@xxxxxxxxxxxxx> wrote in message
> news:eEthe.1603$sb5.1088@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> The db is a invoice database. purpose of timecards form is to record
> allinfo
>> for a invoice, such as employee time, vendor material, payments to
> invoice,
>> employee commission. date of invoice and how many times sent and by who,
>> history of payments, count how many employees worked on what job, what
> date
>> and their hours, this used to calculate the expenes for the job, i.e.
>> timecard as well as material used so invoice price can be calculated.
>> Time is not calculated on this form, only days, dates. The ONLY thin I
> need
>> help with is the sub-form Time And Hours on the main form TimeCards,
>> thats
>> it.
>> as for the rocordsource, this is easily found via the forms in design
> mode.
>> the whole timecard is one (1) record.
>> datasource for main form is query QDates, but this does no have anything
> to
>> do with problem at hand.
>> recordsource for sub-form time and hours is a query named Time_Hours.
>> Call me if you have any questions or else e-mail you number and I will
> call
>> you.
>> The database is very complex, but we are ONLY dealing with one form, the
>> sub-form, Time and Hours
>> the data is there but I need to see it in a different way.
>>
>> Thanks,
>>
>> Dave
>>
>>
>>
>> "Van T. Dinh" <VanThien.Dinh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:u9DHY8LUFHA.2056@xxxxxxxxxxxxxxxxxxxxxxx
>> > Sorry but I am not getting the picture of your set-up. Post the
>> > following:
>> >
>> > 1. What is the purpose of the database? What is the purpose of the
> Form
>> > /
>> > Subform?
>> >
>> > 1. The RecordSource of the Main Form ("TimeCards"). This is important
> as
>> > I
>> > got no ideas what the Form is supposed to do and hence can't place your
>> > DCount or your requirement correctly. Since the Subform already "uses"
>> > the
>> > 2 Tables (?) you described, I got no ideas of the data source for the
> main
>> > Form.
>> >
>> > 2. The RecordSource of the Subform ("Time and Hours")
>> >
>> > 3. The LinkMasterFields and LinkChildField of the Subform Control.
>> >
>> > 4. In one of the earlier, you posted an example with 4 Records (3 on
> the
>> > same date and 1 on a different date) and you mentioned "On the Form
>> > with
>> > record selector", I guess you actually meant the Subform?
>> >
>> > 5. From the same sample data, I guess you want the count of days with 1
> or
>> > 2
>> > employees AND the count of days with more than 2 employees that
>> > *belong/
>> > are
>> > related* to the CurrentRecord of whatever on the main Form
>> > (RecordSource
> /
>> > entity unknown - see point 1) so that you can work out the total hourly
>> > rate
>> > applicable for each day?
>> >
>> > 6. What happens if 2 or more employees work on the same date on the
>> > same
>> > (IGNORE THIS)
>> > CurrentRecord on the main Form but they work different number of hours
> at
>> > different time? Let's say 3 employees but Employee1 works full day,
>> > Employee2 work 1/2 day in the morning and Employee 3 works 1/4 day in
> the
>> > afternoon (hence the nett workforce is less than 2)? How would you
>> > calculate the hourly rate in this case?
>> >
>> > --
>> > HTH
>> > Van T. Dinh
>> > MVP (Access)
>> >
>> >
>> >
>> > "Dave Elliott" <dave@xxxxxxxxxxxxxxxxxx> wrote in message
>> > news:_fqde.190$1o3.62@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >> Table Structure: 2 tables used for form; Hours and Employees
>> >> From the Hours table these fields;HoursID-TimeID-Hours-Overtime-Work
>> > Date-OT
>> >> Rate-Pay Rate-EmployeeID
>> >> From the Employees table; EmployeeID
>> >>
>> >> TimeID links the sub-form (Time and Hours) to the main form TimeCards
>> >> EmployeeID links the 2 tables and TimeID links the sub-form to the
>> >> main
>> >> form. (TimeCards) Master/Child
>> >> The sub-form gives exactly what I need, all the data is there, just
> cant
>> > see
>> >> it the way i want
>> >>
>> >> I need to get the number of records that have more than 2 employees on
>> > them
>> >> and the count of the employees
>> >> I then would have to subtract the total number of records minus the
> ones
>> >> that have more than 2 employees on them for my calculation. I can use
>> >> another form to do this and base it on another query but dont know how
> to
>> >> structure it.
>> >> Remember for 1 or 2 employees the rate is 65, then after for each
>> >> employee
>> >> 1/2 the rate per hour
>> >> Same thing with 55 rate.
>> >>
>> >
>> >
>>
>>
>
>


.



Relevant Pages

  • Re: DCount Code Problem ?
    ... > The db is a invoice database. ... > help with is the sub-form Time And Hours on the main form TimeCards, ... >> Van T. Dinh ... >>> I need to get the number of records that have more than 2 employees on ...
    (microsoft.public.access.forms)
  • Re: DCount Code Problem ?
    ... The db is a invoice database. ... history of payments, count how many employees worked on what job, what date ... help with is the sub-form Time And Hours on the main form TimeCards, ... The RecordSource of the Main Form. ...
    (microsoft.public.access.forms)
  • Re: Two Tables with Left Outer Join & Where Clause
    ... WHERE lmpEmployeeID is NULL and lmpTimecardDate = '10/24/2007' ... in the outer table, Employees in this case. ... from the Timecards table, but for the employees there there is no timecard, ...
    (comp.databases.ms-sqlserver)
  • Re: Two Tables with Left Outer Join & Where Clause
    ... WHERE lmpEmployeeID is NULL and lmpTimecardDate = '10/24/2007' ... in the outer table, Employees in this case. ... from the Timecards table, but for the employees there there is no timecard, ...
    (comp.databases.ms-sqlserver)
  • Calculate an amount for a group of records based on number of reco
    ... I have an invoice form and the amount of the invoice is to be shared between ... THe employees to receive a portion of the invoice are ...
    (microsoft.public.access.modulesdaovba)