If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
combo box look up text box error
I used this code
=DSum("Amount", "[July 09 - On Billings and Adjustments Data Query]", " [Customer No#] = " & cboCustomerNumber & " AND Format([Posting Date Period], ""yyyymm"") = '" & Format(cboPostingDate, "yyyymm") & "'") to put the values in my text box but i'm just getting #error in the text box i have Customer Number box pulling the Customer number from the customer listing table, and the rest coming from the July 09 - On Billings and Adjustments Data Query , would this give me my error?? Thanks yous again for you expert advice |
#2
|
|||
|
|||
combo box look up text box error
It's not advisable to use embedded spaces or any special characters in your
table or column names as it can cause problems. The first thing to do is to display your query e.g. Dim strSQL as string strSQL = " [Customer No#] = " & cboCustomerNumber & " AND Format([Posting Date Period], ""yyyymm"") = '" & Format(cboPostingDate, "yyyymm") & "'" Msgbox strSQL to see what you are getting. -- Dorian "Give someone a fish and they eat for a day; teach someone to fish and they eat for a lifetime". "Alan" wrote: I used this code =DSum("Amount", "[July 09 - On Billings and Adjustments Data Query]", " [Customer No#] = " & cboCustomerNumber & " AND Format([Posting Date Period], ""yyyymm"") = '" & Format(cboPostingDate, "yyyymm") & "'") to put the values in my text box but i'm just getting #error in the text box i have Customer Number box pulling the Customer number from the customer listing table, and the rest coming from the July 09 - On Billings and Adjustments Data Query , would this give me my error?? Thanks yous again for you expert advice |
Thread Tools | |
Display Modes | |
|
|