Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    query data - all 0's (Access '97)

    I am having trouble with my data. When I run a query - any field in which I have added a couple of fields or run a calculation off another field - I always have all 0's displayed. Looking at the Datasheet View the data is there. I am at a loss. Any help would be appreciated.

    Also, is it possible to set up Access to have two forms up and just possibly "TAB" from one to another?

    Thanks in advance for all your help.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: query data - all 0's (Access '97)

    Unless you post the SQL for your query, it is impossible for anyone to guess what might be happening in it. Is this by any chance an update query your viewing as a datasheet? You don't see actual results when you preview an update query.
    Charlotte

  3. #3
    New Lounger
    Join Date
    Sep 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: query data - all 0's (Access '97)

    In the SQL view - the statement has "SELECT tblWeights.field, tblWeights.field2....From tblWeights. They appear to be the correct fields from the correct table. I setup the query using the simple query wizard, selecting the desired fields. What should you recommend next?

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: query data - all 0's (Access '97)

    Would you like to post your SQL so we can take a look at it.
    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: query data - all 0's (Access '97)

    As Pat suggests, copy the SQL from the SQL view and paste in into a post. Otherwise, we're just guessing.
    Charlotte

  6. #6
    New Lounger
    Join Date
    Sep 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: query data - all 0's (Access '97)

    Sorry for the delay, but I have been out of town on business.
    Here is the SQL view :
    "SELECT tblSoursSanding.Time, tblSoursSanding.wtSanded, tblSoursSanding.wtCitricBefore, tblSoursSanding.wtCitricAfter, tblSoursSanding.wtCitricDelivered, tblSoursSanding.wtSugarBefore, tblSoursSanding.wtSugarAfter, tblSoursSanding.wtSugarDelivered, tblSoursSanding.PerfCitric, tblSoursSanding.PerfSugar
    FROM tblSoursSanding; ".

    I added the quotation marks. I hope this will help. Thanks again.

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: query data - all 0's (Access '97)

    This does not show me anything at all, all it shows is that you have selected fields from the table.
    Why don't you post a zipped version of your database, and we can have a look at it.
    Pat

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: query data - all 0's (Access '97)

    Sorry, but the SQL you posted doesn't agree with the statement you made about calculated fields
    <hr>When I run a query - any field in which I have added a couple of fields or run a calculation off another field - I always have all 0's displayed.<hr>
    Since all the fields appear to be table fields rather than expressions, the SQL tells us nothing. If you run the query as shown, do you see zeros? If so, then those are the values in the fields and there's nothing wrong with the query. If not, then that isn't the query you need to post.
    Charlotte

  9. #9
    New Lounger
    Join Date
    Sep 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: query data - all 0's (Access '97)

    I will have to wait till I get to work before I can possibly send the database. In the table, the columns with these field names do have the correct results, as do the fields in the form. If I run the query as shown -(using the Query Wizard) I see only zero's in these fields which have something similar " =((field1-field2)/field1))". Thanks in advance again and I do appreciate all your patience with me. I am learning this as I go along.

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: query data - all 0's (Access '97)

    "Using the query wizard"? Do you mean running it from the QBE interface? The query wizard helps you build queries.
    Attached Images Attached Images
    Charlotte

  11. #11
    New Lounger
    Join Date
    Sep 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: query data - all 0's (Access '97)

    Yes, I have been using the "Simple Query Wizard", exactly as shown. Am I not developing it far enough? The most I can zip my database is 558k, so I may need to make some changes.. thanks..

  12. #12
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: query data - all 0's (Access '97)

    All the simple query wizard does is built the SQL for a query. It doesn't have anything to do with zeroes showing up in the query when you run it. If you get zeroes when you run the query, it's because there are zeroes in the fields. Are you using another query as the source for the wizard-built query? I still don't understand where the calculations you referred to come in. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Charlotte

  13. #13
    New Lounger
    Join Date
    Sep 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: query data - all 0's (Access '97)

    I believe I may have gotten the problem somewhat solved.
    Here a sample copy of the SQL statement:
    "SELECT tblFinish.tmStart, tblFinish.tmFinish, tblFinish.Coat, IIF([tmStart]<[tmFinish],24-[tmStart+[tmFinish],[tmStart]-[tmFinish]) AS [tmCoat]
    FROM tblFinish;"

    I build some expressions in the query design and for the most part it is working. I am getting numbers now in the query that I built, also the fields and the tables. Yet if I run a new query using the Simple Query Wizard, I still get 0's as results????? Thanks to all..

  14. #14
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: query data - all 0's (Access '97)

    Why don't you email the zipped DB to my email address, my email address is in my profile.
    Would you tell me which query is showing these zeroes?
    I'll tell you all that I find.
    Pat

  15. #15
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: query data - all 0's (Access '97)

    The simple query wizard is for building queries, not for running them. Why are you using it at all if you already have the query built?? <img src=/S/confused.gif border=0 alt=confused width=15 height=20> If you just want to run a query, double click it in the database window. I assume you *are* saving the query at some point, right?
    Charlotte

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •