Problem with Running Sum Expression

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Access 2000. This expression has worked well for a couple of years up
untill now.(I received this from this newsgroup) The only thing I have
done is change the format from number to text on the field [App_ID] of my
table [Account]. The App_ID field used to be strickly numbers, now they are
alphanumeric. This is when my running sum expression quit working. Can any
one help? This expression is on my form "Accounts" Thanks, Randy

=IIf([cboAppID] Is Null,"",DSum("[Debit]","[Account]","[App_ID] = " &
[App_ID] & " AND [Date_Issued] <= #" & [Date_Issued] &
"#")-DSum("[Credit]","[Account]","[App_ID] = " & [App_ID] & " AND
[Date_Issued] <= #" & [Date_Issued] & "#"))
 
text values have to be enclosed by single quotes, just as you enclosed your
date values by # signs.

hth
 
How do I do that?
tina said:
text values have to be enclosed by single quotes, just as you enclosed
your
date values by # signs.

hth


Randy said:
Access 2000. This expression has worked well for a couple of years up
untill now.(I received this from this newsgroup) The only thing I have
done is change the format from number to text on the field [App_ID] of my
table [Account]. The App_ID field used to be strickly numbers, now they are
alphanumeric. This is when my running sum expression quit working. Can any
one help? This expression is on my form "Accounts" Thanks, Randy

=IIf([cboAppID] Is Null,"",DSum("[Debit]","[Account]","[App_ID] = " &
[App_ID] & " AND [Date_Issued] <= #" & [Date_Issued] &
"#")-DSum("[Credit]","[Account]","[App_ID] = " & [App_ID] & " AND
[Date_Issued] <= #" & [Date_Issued] & "#"))
 
=IIf([cboAppID] Is Null,"",DSum("[Debit]","[Account]","[App_ID] = '" &
[App_ID] & "' AND [Date_Issued] <= #" & [Date_Issued] &
"#")-DSum("[Credit]","[Account]","[App_ID] = '" & [App_ID] & "' AND
[Date_Issued] <= #" & [Date_Issued] & "#"))


Randy said:
How do I do that?
tina said:
text values have to be enclosed by single quotes, just as you enclosed
your
date values by # signs.

hth


Randy said:
Access 2000. This expression has worked well for a couple of years up
untill now.(I received this from this newsgroup) The only thing I have
done is change the format from number to text on the field [App_ID] of my
table [Account]. The App_ID field used to be strickly numbers, now
they
are
alphanumeric. This is when my running sum expression quit working.
Can
any
one help? This expression is on my form "Accounts" Thanks, Randy

=IIf([cboAppID] Is Null,"",DSum("[Debit]","[Account]","[App_ID] = " &
[App_ID] & " AND [Date_Issued] <= #" & [Date_Issued] &
"#")-DSum("[Credit]","[Account]","[App_ID] = " & [App_ID] & " AND
[Date_Issued] <= #" & [Date_Issued] & "#"))
 
Thanks for the help, but i get a popup stating
"You may have entered an operand without an operator" Any ideas, Thanks for
your help

tina said:
=IIf([cboAppID] Is Null,"",DSum("[Debit]","[Account]","[App_ID] = '" &
[App_ID] & "' AND [Date_Issued] <= #" & [Date_Issued] &
"#")-DSum("[Credit]","[Account]","[App_ID] = '" & [App_ID] & "' AND
[Date_Issued] <= #" & [Date_Issued] & "#"))


Randy said:
How do I do that?
tina said:
text values have to be enclosed by single quotes, just as you enclosed
your
date values by # signs.

hth


Access 2000. This expression has worked well for a couple of years up
untill now.(I received this from this newsgroup) The only thing I have
done is change the format from number to text on the field [App_ID] of my
table [Account]. The App_ID field used to be strickly numbers, now they
are
alphanumeric. This is when my running sum expression quit working. Can
any
one help? This expression is on my form "Accounts" Thanks, Randy

=IIf([cboAppID] Is Null,"",DSum("[Debit]","[Account]","[App_ID] = " &
[App_ID] & " AND [Date_Issued] <= #" & [Date_Issued] &
"#")-DSum("[Credit]","[Account]","[App_ID] = " & [App_ID] & " AND
[Date_Issued] <= #" & [Date_Issued] & "#"))
 
I got it to work, Thanks Tina.

Randy said:
Thanks for the help, but i get a popup stating
"You may have entered an operand without an operator" Any ideas, Thanks
for your help

tina said:
=IIf([cboAppID] Is Null,"",DSum("[Debit]","[Account]","[App_ID] = '" &
[App_ID] & "' AND [Date_Issued] <= #" & [Date_Issued] &
"#")-DSum("[Credit]","[Account]","[App_ID] = '" & [App_ID] & "' AND
[Date_Issued] <= #" & [Date_Issued] & "#"))


Randy said:
How do I do that?
text values have to be enclosed by single quotes, just as you enclosed
your
date values by # signs.

hth


Access 2000. This expression has worked well for a couple of years
up
untill now.(I received this from this newsgroup) The only thing I have
done is change the format from number to text on the field [App_ID]
of my
table [Account]. The App_ID field used to be strickly numbers, now they
are
alphanumeric. This is when my running sum expression quit working. Can
any
one help? This expression is on my form "Accounts" Thanks, Randy

=IIf([cboAppID] Is Null,"",DSum("[Debit]","[Account]","[App_ID] = " &
[App_ID] & " AND [Date_Issued] <= #" & [Date_Issued] &
"#")-DSum("[Credit]","[Account]","[App_ID] = " & [App_ID] & " AND
[Date_Issued] <= #" & [Date_Issued] & "#"))
 

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

Back
Top