Search results

  1. A

    Delete corrupt table - Error database engine could not lock table

    Hi. Please follow this thread on http://www.utteraccess.com/forum/index.php?&act=Post&CODE=02&f=54&t=2050915&qpid=2697603. It was cross posted
  2. A

    Delete corrupt table - Error database engine could not lock table

    Sorry, I'm new to this. Is my thread/question still "active" or do I need to post a new one?
  3. A

    Delete corrupt table - Error database engine could not lock table

    Hi I have a table with a corrupt record (Chinese character in one of the columns). I'm trying write code to resolve this should it happen again. I know ... we should rather try to ensure the db doesn't become corrupted .. however ours still manage to be from time to time. So the corrupt record...
  4. A

    Dynamically change order of buttons on a form

    Ahh ... Thanks I never thought of disabling the buttons. That will be much easier :)
  5. A

    Dynamically change order of buttons on a form

    Hi I have a home page with various buttons. Depending on the user's security group, only certain buttons will be available. However, when the buttons are hidden that he cannot see, there are big gaps between the buttons. Is there a way that I can "auto arrange" the buttons after I've hidden...
  6. A

    MS Access - Sum() not calculating correctly

    Well ... I seem to have solved it .. I took q_ageanalysislines, removed one of the union statements to see if I could eliminate the problem. The results were correct. I added the union statement back again and now the query returns the correct results. Don't really understand why that...
  7. A

    MS Access - Sum() not calculating correctly

    Although ... as I replied to arnelgp .. when I do a sum(credit) using the sql of the query, I get the correct figure: select sum(credit) from ( SELECT customers.company, customers.id, customers.custaccno, customers.address1, customers.address2...
  8. A

    MS Access - Sum() not calculating correctly

    Ok, here goes ... this is my q_ageanalysislines query. I'm an Oracle sql developer so my access skills aren't so hot. This query might not work that well on access so any tips will help : SELECT customerid, c.company, fix(100*v_totage120)/100 AS totage120, fix(100*v_totage90)/100 AS totage90...
  9. A

    MS Access - Sum() not calculating correctly

    Hi grandpa, sorry only saw this question now ... In the first query, there is a reference to something called "AGE" and it is involved in ordering records (GROUP BY). What is "age" in this context? Is it a computation in the query that is the record source q_ageanalysislines for the two queries...
  10. A

    MS Access - Sum() not calculating correctly

    LOL ... this is getting weirder .... SELECT count(1) FROM q_ageanalysislines where customerid = 634 and credit = 6000 Returns : 3 SELECT count(1), min(trndate), max(trndate) FROM q_ageanalysislines where customerid = 634 and credit = 6000 Returns: 4 - 2017/05/01 - 2018/07/07
  11. A

    MS Access - Sum() not calculating correctly

    arnelgp, I did what I think you suggested. I took the base code of the query q_ageanalysislines, put a select sum(credit) around it and I got to the correct 278111.46. So the issue comes when I sum from the query q_ageanalysislines
  12. A

    MS Access - Sum() not calculating correctly

    Sorry arnelgp, getting back to your post ... do you mean running the query against the table that sources the q_ageanalysislines? The q_ageanalysislines is a complex query with a couple of union statements and 5 union statements :(
  13. A

    MS Access - Sum() not calculating correctly

    SELECT count(1) FROM q_ageanalysislines where customerid = 634 and credit = 6000 Result : 3 SELECT * FROM q_ageanalysislines where customerid = 634 and credit = 6000 Returns 4 records
  14. A

    MS Access - Sum() not calculating correctly

    SELECT count(1) FROM q_ageanalysislines where customerid = 634 Result : 83 SELECT count(1) FROM q_ageanalysislines where customerid = 634 and trndate > datevalue('2016/05/01') Result : 84 SELECT count(1) FROM q_ageanalysislines where customerid = 634 and trndate <= datevalue('2016/05/01')...
  15. A

    MS Access - Sum() not calculating correctly

    Breaking it down even further (sorry arnelgp, will answer you just after this) : SELECT sum(credit) as tot FROM q_ageanalysislines where customerid = 634 Returns : 272111.46 SELECT sum(credit) as tot FROM q_ageanalysislines where customerid = 634 and trndate > datevalue('2016/05/01')...
  16. A

    MS Access - Sum() not calculating correctly

    Further to the above ..... The following sql returns 272111.46 : select sum(tot) from ( SELECT sum(credit) as tot FROM q_ageanalysislines where customerid = 634) This sql returns 278111.46: select sum(tot) from ( SELECT sum(credit) as tot FROM q_ageanalysislines where customerid =...
  17. A

    MS Access - Sum() not calculating correctly

    Hi Hope someone can help. I have a simple sql : SELECT sum(credit) as tot FROM q_ageanalysislines where customerid = 634 This query returns a total of 272111.46 When I run the following however, select sum(tot) as GrandTot from ( SELECT age, sum(credit) as tot FROM q_ageanalysislines...
Back
Top Bottom