A
Alan
Hi I was given this code to look up on two combo box name
Customer Number
Posting Date Period
which then a third combo box would look up on these two combo box an sum the
value Amount field in a table
for example
Customer Number C00001
Posting Date 2009/07
Amount £5000
This is my code so far
=DSum("Amount",
" July 09 - On Billings and Adjustments Data Query ",
" Format (Customer No#, "text) = " & Format
(cboCustomerNumber.Value, "text") &
" AND Format(Posting Date Period, "yyyymm) = "'" &
Format(cboPostingDate.Value, "yyyymm") & "'")
i tired changing the format of the customer number because it begins with a
C so must be a text field,
but i keep getting the same old error
Invaild syntax
You may have enetred an operand without and operator
can anyone help
many thanks
Customer Number
Posting Date Period
which then a third combo box would look up on these two combo box an sum the
value Amount field in a table
for example
Customer Number C00001
Posting Date 2009/07
Amount £5000
This is my code so far
=DSum("Amount",
" July 09 - On Billings and Adjustments Data Query ",
" Format (Customer No#, "text) = " & Format
(cboCustomerNumber.Value, "text") &
" AND Format(Posting Date Period, "yyyymm) = "'" &
Format(cboPostingDate.Value, "yyyymm") & "'")
i tired changing the format of the customer number because it begins with a
C so must be a text field,
but i keep getting the same old error
Invaild syntax
You may have enetred an operand without and operator
can anyone help
many thanks