1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved MS Access: Query not updating from Form

Discussion in 'Business Applications' started by Alchemi, Dec 9, 2018.

Thread Status:
Not open for further replies.
Advertisement
  1. Alchemi

    Alchemi Thread Starter

    Joined:
    Sep 13, 2018
    Messages:
    13
    First Name:
    Chris
    Hello again: New database, new problem

    I thought I've built my parts like I'm used to but something's not happening right. I have a form where a person makes an order, and when they are ready it's supposed to go to a report to show their request. The report is coming up with no data (fields are blank). I've traced it backwards as the report actually calls up the query, where the query is supposed to find the order from the form. The query is also coming up blank, so that explains the blank report. The thing that's truly mystifying is let's say I go on in the form to make a second request (a new record), which also doesn't appear in a query, but now the first order (the original record) is now available in the query. It's like I have to advance the record for it to appear in the system.

    Is there a toggle or something I missed that gets form data passed to the table, and the query is missing it until I go to a new record?
     
  2. lunarlander

    lunarlander

    Joined:
    Sep 21, 2007
    Messages:
    11,583
    Did you save the data in the first row/record ?
     
  3. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    lunarlander is correct, although Access automatically saves additions and edits there is an occassion when it doesn't and that is when the cursor is still in a field that is being edited/entered.
    The record can be saved using VBA as part of the report calling button's VBA.
    But these days the Access button wizard tends to use macros, so you would need to update the macro with the save command instead.
     
  4. Alchemi

    Alchemi Thread Starter

    Joined:
    Sep 13, 2018
    Messages:
    13
    First Name:
    Chris
    Thanks for the replies Lunarlander and OBP, I appreciate the feedback and help

    That sounds fine, although I do wish I knew what I did differently to get me in this spot.

    I'm OK with making a new form and query, rather not remake the report as I have a lot of time invested into it.

    So this Save macro, what would it look like?
     
  5. Alchemi

    Alchemi Thread Starter

    Joined:
    Sep 13, 2018
    Messages:
    13
    First Name:
    Chris
    I think I found a solution. Added a "Save Record" line to the macro that initiates the reporting process (the button calls the report, which in turn calls up the query). Done it a couple times now and seems to work like a charm.
     
  6. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Well done. (y)
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1220246

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice