form field calculation

G

Guest

Hallo

I hope some one can help i have a form thatis used for sales and i have a
total field that has the total of the sales. What i need now is a field where
i can enter the amount the customer gave me and it gives me the change amount
i need to give to the customer. But i want it to be like as i type in the
amount the customer gives me the change field must change it must be like
real time i dont want to go to a difrent field first before it gives the
change.

I hope some one can help
Markus
 
G

Guest

create another field in the form that will display the change need to be
given,in the source control of the field you should writ
=iif(isnull(forms![FormName]![TotalMoneygivenByCust]),0,forms![FormName]![TotalMoneygivenByCust]-nz(forms![FormName]![TotalSalesFieldName],0))

if the total sales in a sub form then change it to
forms![FormName]![SubFormName].Form![TotalSalesFieldName]
 
G

Guest

It does not work the change field only changes ones I confirm it with enter
or go to a next field I need it to change while typing in the amount example
he has to pay 10 Euro and I type in 2 it should already tell me 18 still
needs to be paid before I even type in the 0 for a 20 Euro. It very important
the change field needs to change as I am typing in the amount the customer
gives me

Ofer said:
create another field in the form that will display the change need to be
given,in the source control of the field you should write
=iif(isnull(forms![FormName]![TotalMoneygivenByCust]),0,forms![FormName]![TotalMoneygivenByCust]-nz(forms![FormName]![TotalSalesFieldName],0))

if the total sales in a sub form then change it to
forms![FormName]![SubFormName].Form![TotalSalesFieldName]

Markus said:
Hallo

I hope some one can help i have a form thatis used for sales and i have a
total field that has the total of the sales. What i need now is a field where
i can enter the amount the customer gave me and it gives me the change amount
i need to give to the customer. But i want it to be like as i type in the
amount the customer gives me the change field must change it must be like
real time i dont want to go to a difrent field first before it gives the
change.

I hope some one can help
Markus
 

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