Z
znibk
I am trying to convert a Sales Journal into an Access Database. It has four
columns: sales, long, short, and deposit. Each day, the sales deposit will
either have a deposit where money in the cash drawer equals the amount
recorded on the sales ticket, therefore: [sales]=[salesdeposit]; some days
there is more money in the cash drawer than recorded on the sales ticket,
long, therefore: [sales]+[long]=[salesdeposit]; and some days there is less
money in the cash drawer than recorded on the sales ticket, short, therefore:
[sales]-[short]=[salesdeposit].
This information needs to be on the Form so immediate calculation of the
deposit is made (as if it was in an Excel Spreadsheet) I tried
=salesdeposit!Sales-[Short]+[Long] and when I went to form view, I received
#Name? So I tried other calculations and got nowhere. I decided to try the
IIF Statement.
I tried various IIF Statements like: =IIF(IsNull([Long]) And
([Short]),([Sales]),=IIF(Is
Null([Long]),([Sales])-([Short]),=IIf(IsNull([short]),([sales])+([long])---With
this expression, I get a message which says I have an Invalid Control
Property:control Source and Expression must begin with = sign. So I tried
=IIF(Is Null([Long]),([sales])-([short])=([salesdeposit]),If(Is
Null([Short]),[(sales])+([Long])=([salesdeposit]),([sales])=([salesdeposit]),([sales](=([salesdeposit])
What am I doing wrong?
columns: sales, long, short, and deposit. Each day, the sales deposit will
either have a deposit where money in the cash drawer equals the amount
recorded on the sales ticket, therefore: [sales]=[salesdeposit]; some days
there is more money in the cash drawer than recorded on the sales ticket,
long, therefore: [sales]+[long]=[salesdeposit]; and some days there is less
money in the cash drawer than recorded on the sales ticket, short, therefore:
[sales]-[short]=[salesdeposit].
This information needs to be on the Form so immediate calculation of the
deposit is made (as if it was in an Excel Spreadsheet) I tried
=salesdeposit!Sales-[Short]+[Long] and when I went to form view, I received
#Name? So I tried other calculations and got nowhere. I decided to try the
IIF Statement.
I tried various IIF Statements like: =IIF(IsNull([Long]) And
([Short]),([Sales]),=IIF(Is
Null([Long]),([Sales])-([Short]),=IIf(IsNull([short]),([sales])+([long])---With
this expression, I get a message which says I have an Invalid Control
Property:control Source and Expression must begin with = sign. So I tried
=IIF(Is Null([Long]),([sales])-([short])=([salesdeposit]),If(Is
Null([Short]),[(sales])+([Long])=([salesdeposit]),([sales])=([salesdeposit]),([sales](=([salesdeposit])
What am I doing wrong?