as records added(jobs sched)-#days from est. days

B

babs

I have a subform based on a query - where I schedule the job# - there is an
est. days the job should take. right now the query in Not updateable since I
am calculating the Actual days worked and sub that from the est. days to get
Difference in Days.(ie.- to know if need to schedule more people on that job)
- the actual days is calculated in a Group by Job# query and the est. days
comes from the Job Writeup file(not grouped).

I want to be able to Add records to this query to schedule the job and as a
person is scheduled(on subform-based on a query) I would like the # days dif.
to be updated. I would like to be able to run a report on the Difference
indays so assuming I need to Store that value somewhere in order to run the
report-

Basically can't figure out how to Sum the Actual days worked and do
calculation for difference without Grouping - and making the subform-
updateable????


impt fields in Write up table - job#, est. days
impt fields in groupby job # query - job# act days, calc dif in days= est.
days - act. days.

any ideas?
Thanks,
Barb
 
J

John W. Vinson

Basically can't figure out how to Sum the Actual days worked and do
calculation for difference without Grouping - and making the subform-
updateable????

I'd suggest basing the subform on an updateable query with no summing, and use
a textbox with a control source using DSum() to sum up the hours.
 
B

babs

I calculated the Dsum and put it in the subform Footer than transfer or said
the text box in the subform = the Value of the Dsum calc in the subform
footer- It all looks good when I am in Layout view and even in datasheet view
when just looking at the subform by itself - when I view the subform on the
Main form the column with the Dsum(= to the calc value in the subform footer)
- the column is BLANK.

What am I missing - why is it blank when viewing as the Subform on the Main
form??

Thanks,
Barb
 
J

John W. Vinson

I calculated the Dsum and put it in the subform Footer than transfer or said
the text box in the subform = the Value of the Dsum calc in the subform
footer- It all looks good when I am in Layout view and even in datasheet view
when just looking at the subform by itself - when I view the subform on the
Main form the column with the Dsum(= to the calc value in the subform footer)
- the column is BLANK.

What am I missing - why is it blank when viewing as the Subform on the Main
form??

Please post the actual dsum expression you're using. If it references a
control on the form you may be running into subform syntax problems.
 
B

babs

this is the Dsum calc I have in the subform footer The Name of it is
txtActMandays.


=DSum("([Hours(ST)Cor]+([Hours(T 1/2)Cor]*1.367)+([Hours
DTCor]*1.7346)+([ShiftHrsCor]*1.15))/8","JeffTime Card MD Query","[Job #] = "
& [Job #])

the calculation is accurate it sums all the hours as jobs are assigned #
hours to be worked on the jobs - I have in the actual Detail part of the
subform 2 other fields that I use this calcuation in . -

For the field
Acutal Mandays in the detail part have control source =[txtActMandays]
and its working when opening only subform and also in detail part of subform

Difference =IIf([contract type]=0,([estimated mandays]-[actual mandays
correction]),0)

Est Mandays just originally input with job #. So all works fine

but when open it as subform ON Main form(not referencing any control on main
for for these fields??) These calcuated columns are empty - sometimes when
click on calc field - a value shows up - sometime wrong calc. most of the
time No value at all is visible for calculation result.

thanks soo much for you help- really just try to schedule a job and as hours
are scheduled want to add up act mandays worked and subtract from estimate.

seems good on subform but not when viewing Through Main form.

thanks,
Barb
 
J

John W. Vinson

=DSum("([Hours(ST)Cor]+([Hours(T 1/2)Cor]*1.367)+([Hours
DTCor]*1.7346)+([ShiftHrsCor]*1.15))/8","JeffTime Card MD Query","[Job #] = "
& [Job #])

Part of the problem MAY be the use of nonstandard characters (such as ), (, /,
# and blank) in fieldnames. In particular I've seen erroneous results when
fieldnames contain the / character. Try changing the fieldnames or using an
alias in your query (e.g. SELECT [Hours(T 1/2)Cor] AS HoursCor...).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top