Results 1 to 11 of 11
  1. #1
    Join Date
    Nov 2003
    Posts
    150

    Angry Unanswered: Disappearing Query?????

    I have a form that also displays the results of a query. Everything runs fin, until i close the form ( and save it ) and try to re-open it. It then tells me that:

    'Query must have at least one destination field'

    When i click OK, the form doesnt open properly, and when i have a look at my query, it's empty?????

    I really dont get why this is happening???

    any ideas?
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  2. #2
    Join Date
    Nov 2002
    Location
    Wyoming
    Posts
    48
    What type of query is this?
    Cheers,
    Ken

  3. #3
    Join Date
    Nov 2003
    Posts
    150
    it's a select query that also performs some simple calculations
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    This message shoud be shown when you use an UPDATE Query.

    Do you try to update some fields?

  5. #5
    Join Date
    Nov 2003
    Posts
    150
    yes, there is a field that is updated from the query. I use the DLookup command for this.
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  6. #6
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Originally posted by MrCrud
    yes, there is a field that is updated from the query. I use the DLookup command for this.
    If it is an UPDATE Query, then you should update at least one Field.

  7. #7
    Join Date
    Nov 2003
    Posts
    150
    here is the query itself:

    SELECT tblOrderDetails.intOrderID, tblProductInfo.intProductID, tblProductInfo.strProductName, tblProductInfo.curUnitRetail, tblOrderDetails.intQuantity, tblOrderDetails.intDiscount, CCur(tblProductInfo.curUnitRetail*[intQuantity]*(100-[intDiscount])/100) AS curExtendedPrice
    FROM tblProductInfo, tblOrderDetails
    ORDER BY tblOrderDetails.OrderID;

    The results of this query are displayed as a subform in a form. It's when i try to load this main form that i get the error.

    All the field name and table names are good, and i think the syntax is ok as well.
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  8. #8
    Join Date
    Nov 2002
    Location
    Wyoming
    Posts
    48
    The first thing I notice is that there in no WHERE clause or JOIN. It would seem to me that you will need these.

    Was this query created as part of a module in VBA or useing the query designer? If the latter, can you run the query and get results?

    If you open the subform by itself you get results but not if you open both the main form and subform together, is this correct?
    Cheers,
    Ken

  9. #9
    Join Date
    Nov 2003
    Posts
    150
    If i open the subform only, i get the results i want. If i open the main form, and then add the subform to it, it also works, but just once. If i close the main form, and open it again, i get the error and the form doesnt open properly. After, if i take a look at the query, it's empty!!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  10. #10
    Join Date
    Nov 2002
    Location
    Wyoming
    Posts
    48
    Would it be possible to email me the database?
    Cheers,
    Ken

  11. #11
    Join Date
    Nov 2003
    Posts
    150
    Here's my DB.

    The problematic form is frmOrders . You'll note when you open it that the subform in it is unbound. The form i want to display there is based on the results of the query : qryExtendedPrice. Usually, i can get it to work the first time, but not the second.
    Attached Files Attached Files
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

Posting Permissions

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