Ms Access Dsum #error
be down. Please try the request again. Your cache administrator is webmaster. Generated Thu, 20 Oct 2016 19:19:09 GMT by s_wx1062 (squid/3.5.20)
help? Post your question and get tips & solutions from a community of 418,595 IT Pros & Developers. It's quick & easy. Can't figure out error in simple dsum P: n/a deercreek I have the following table test3. RESERVATIONID Site SitePrice 101 RV2 $25.00 101 RV3 $25.00 102 RV4 $25.00 102 RV5 $25.00 104 RV10 $25.00 I created a query with the following dsum DSum("SitePrice", "test3", "Reservationid = 101") When I try to view query I get the following error. Anyone know whats going on? "Data type mismatch in criteria http://answers.microsoft.com/en-us/msoffice/forum/msoffice_access-mso_winother/dsum-calculation-results-in-error/7ce0e422-ef01-4ee2-ad4f-398d57c1679a expression" Dec 19 '05 #1 Post Reply Share this Question 8 Replies P: n/a RoyVidar deercreek wrote in message <11*********************@z14g2000cwz.googlegroups. com> : I have the following table test3. RESERVATIONID Site SitePrice 101 RV2 $25.00 101 RV3 $25.00 102 RV4 $25.00 102 RV5 $25.00 104 RV10 $25.00 I created a query with the following dsum DSum("SitePrice", "test3", "Reservationid = 101") When I try to view query I https://bytes.com/topic/access/answers/437011-cant-figure-out-error-simple-dsum get the following error. Anyone know whats going on? "Data type mismatch in criteria expression" What datatype is Reservationid? I'm guessing it's text, then add single quotes. ...., "Reservationid = '101'") I don't use the Domain Aggregates much, but aren't some of the arguements supposed to be [bracketed]? You could probably also do a pure query like select sum(siteprice) as mysum from yourtable where Reservationid = '101' -- Roy-Vidar Dec 19 '05 #2 P: n/a fredg On 19 Dec 2005 09:03:39 -0800, deercreek wrote: I have the following table test3. RESERVATIONID Site SitePrice 101 RV2 $25.00 101 RV3 $25.00 102 RV4 $25.00 102 RV5 $25.00 104 RV10 $25.00 I created a query with the following dsum DSum("SitePrice", "test3", "Reservationid = 101") When I try to view query I get the following error. Anyone know whats going on? "Data type mismatch in criteria expression" Your expression looks OK if the datatype of the [ReservationID] field is number. Since you are getting a datatype mismatch error, I would have to assume the datatype is actually Text. Try: Total: DSum("[SitePrice]", "test3", "[Reservationid] = '101'") -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail
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 http://www.dbforums.com/showthread.php?1631441-Dsum-error visit from the selection below. Results 1 to 7 of 7 Thread: Dsum #error Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 06-20-08,03:28 #1 big_mon View Profile View Forum Posts Registered User Join Date Jan 2008 Posts 54 Unanswered: Dsum #error I am stumped over DSUM. I have a datasheet subform consisting of a few ms access fields PurchasedQty, ConsumedQty and txtRemain. The subform is bound to tblsubProduct. txtRemain is an unbound field and its control source is =DSum("[PurchasedQty]-[ ConsumedQty]","tblsubProduct","(QtyID<= " & NZ([txtQtyID],0) & ") And ([ItemDesc]= '" & Replace([ItemDesc],"'","''") & "')") The data type is as follows PurchasedQty number (default 0) ConsumedQty number (a combo default 0) QtyID autonumber ItemDesc text The result is fine except for new record at the bottom of the datasheet subform where the record selector ms access dsum points when the form opens. When IDate and ConsumedQty values are entered, txtRemain calculates and reads correctly but new record again shows #error as the record selector moves to a new record IDate PurchasedQty ConsumedQty txtRemain 11/02/2008 ...........30 0 30 15/02/2008............ 0 2 28 18/02/2008 ........... 6 2 32 ........................... 0 0 #Error Can any expert please help? Thank you in advance Last edited by big_mon; 06-20-08 at 03:35. Reply With Quote 06-20-08,03:33 #2 big_mon View Profile View Forum Posts Registered User Join Date Jan 2008 Posts 54 Dsum #error Reply With Quote 06-20-08,07:03 #3 StarTrekker View Profile View Forum Posts Visit Homepage L33t Helpa Munky Join Date Nov 2007 Location Adelaide, South Australia Posts 4,049 Looks like there is nothing wrong with your DSUM. All you need to do is something like: IIf(IsNull(IDate),