Re: DCount Code Problem ?
- From: "Dave Elliott" <dave@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 May 2005 15:33:11 GMT
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.
>> >>
>> >
>> >
>>
>>
>
>
.
- Follow-Ups:
- Re: DCount Code Problem ?
- From: Van T. Dinh
- Re: DCount Code Problem ?
- References:
- Re: DCount Code Problem ?
- From: Van T. Dinh
- Re: DCount Code Problem ?
- From: Dave Elliott
- Re: DCount Code Problem ?
- From: Van T. Dinh
- Re: DCount Code Problem ?
- From: Dave Elliott
- Re: DCount Code Problem ?
- From: Van T. Dinh
- Re: DCount Code Problem ?
- From: Dave Elliott
- Re: DCount Code Problem ?
- From: Van T. Dinh
- Re: DCount Code Problem ?
- Prev by Date: Re: Query not pulling from Main Table
- Next by Date: Form showing Calculating in status bar window
- Previous by thread: Re: DCount Code Problem ?
- Next by thread: Re: DCount Code Problem ?
- Index(es):
Relevant Pages
|