J
Joan
I am designing a data entry form where there is one textbox called Early
Booking Bonus. The user has an early booking bonus structure based on the
following calculation :
=Nz(Switch([Enter Date]-[Whelped Date]<21,10,[Enter Date]-[Whelped Date]
Between 22 And 28,7,[Enter Date]-[Whelped Date] Between 29 And
35,5),0)*([Male Quantity]+[Female Quantity])
If booking is made (the enter date) in <= 3 weeks after the date the
animals were born, then they receive $10 per animal
If booking is made between 3 weeks and <= 4 weeks then they receive $7 per
animal
and if booking is made between 4 weeks and <= 5 weeks then they receive $5
per animal.
The user would like this amount to automatically appear in the textbox on
the form after the user has entered the [Enter Date] and the [Whelped Date]
which is no problem for me. However, they also want this amount to be
editable on the form for extenuating circumstances and this is where I am
having difficulty. I read where you cannot make a calculated field in a
query editable. So I tried setting the control source of the text box to
[Early Booking Bonus] and putting the above calculation as the Default
property of the textbox. Then I get a #Name? error where the amount should
be in the textbox. I have double checked spellings of field names and have
brackets around two word field names like I have above. How would be the
best way for me to handle this situation?
Joan
Booking Bonus. The user has an early booking bonus structure based on the
following calculation :
=Nz(Switch([Enter Date]-[Whelped Date]<21,10,[Enter Date]-[Whelped Date]
Between 22 And 28,7,[Enter Date]-[Whelped Date] Between 29 And
35,5),0)*([Male Quantity]+[Female Quantity])
If booking is made (the enter date) in <= 3 weeks after the date the
animals were born, then they receive $10 per animal
If booking is made between 3 weeks and <= 4 weeks then they receive $7 per
animal
and if booking is made between 4 weeks and <= 5 weeks then they receive $5
per animal.
The user would like this amount to automatically appear in the textbox on
the form after the user has entered the [Enter Date] and the [Whelped Date]
which is no problem for me. However, they also want this amount to be
editable on the form for extenuating circumstances and this is where I am
having difficulty. I read where you cannot make a calculated field in a
query editable. So I tried setting the control source of the text box to
[Early Booking Bonus] and putting the above calculation as the Default
property of the textbox. Then I get a #Name? error where the amount should
be in the textbox. I have double checked spellings of field names and have
brackets around two word field names like I have above. How would be the
best way for me to handle this situation?
Joan