Results 1 to 7 of 7
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,195

    Update query returns 0 records

    Hi Guys, i am trying something that should be so simple, running an update query to update records in the table

    Paid field is Yes/No PaidDate is Date Field And InvoiceNumber is Number field

    I may have 20 records with the number that the user has been prompted to enter and the number goes to txtCriteria and a paid date that the user is prompted into txtPaidDate

    When i run this query it returns 0 records ?



    Click image for larger version. 

Name:	Capture.JPG 
Views:	19 
Size:	36.0 KB 
ID:	41145

    Thank you
    Attached Thumbnails Attached Thumbnails Capture.JPG  

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,474
    Said InvoiceNumber is numeric but field in forms looks like text. Not sure if that matters. But change the query to select query and see if you get records with just the Criteria for InvoiceNumber. Are you sure whatever is in that field has records in the table?

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    You criteria design seems to indicate an OR operation.

    (PAID and DaidDate) OR InvoiceNumber

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,474
    Thought that too Orange but then saw those are the Update fields, the only criteria is the InvoiceNumber.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    In a copy of this query substitute an actual invoice number and run it. Assuming you haven't disabled warnings, you should see how many records it will affect vs how many you think that it should. If it appears that it will work, your form field is likely not returning anything to the query. Maybe it's not being updated before the query runs. Maybe it's unbound, which will compound the non-update effect, in which case you probably need to retrieve the control Text property.

    I think you have redundant data. If the paid date is null, there is no payment, yes? Then you don't need a check field for that.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,195
    Thanks guys, will test the query by changing to a select query first to try and retrieve the records, the txtCriteria is also just a text box where the invoice number is held via the user prompt, in the table it is set to a number, will try a few things but first a select query, thank you all

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 01-18-2020, 01:36 PM
  2. Parameter query that returns no records
    By Roncc in forum Access
    Replies: 29
    Last Post: 01-07-2018, 06:01 PM
  3. Update Query - Remove carrier returns
    By zashaikh in forum Forms
    Replies: 16
    Last Post: 01-03-2018, 12:56 PM
  4. SELECT TOP 10 Query returns 12 records
    By Paul H in forum Queries
    Replies: 8
    Last Post: 09-11-2013, 03:38 PM
  5. Access Update Query returns -1
    By Chris Morag in forum Queries
    Replies: 2
    Last Post: 05-27-2011, 06:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums