Results 1 to 4 of 4
  1. #1
    MoeIndustries is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    12

    Clearing table when form opens

    Hello, I have a query of payment runs made. I want people to be able to enter 1 or more payment references so the query only shows those payments.



    I've created a table that will filter the query once references are entered into it.

    What I want now is to create a form so other uses simply enter x amount of references (no limit) into the form and press run for the query to pop open. However, I also want, whenever the form is opened for the table it feeds into to be cleared.

    I've tried a delete query but when I open the form it has #deleted in each of the fields.

    Hope this is making sense - any help???

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Sounds like you need to requery the form after running the query. Alternatively you could run the query before opening it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    MoeIndustries is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    12
    Thank you Paul. Could you explain a bit more? At the moment, in the form I have a macro that runs a delete query on the table when the form is opened. I put a requery macro after that but it says 'Requery macro is not available'.

    Thanks again.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I don't use macros so not sure what you've got. Simplest may be running your query in the open event of the form, if you have it later than that.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Clearing multiracial text box when form opens
    By Jacqueline in forum Forms
    Replies: 14
    Last Post: 09-01-2015, 05:26 PM
  2. Clearing Sub Form
    By eagle670 in forum Forms
    Replies: 19
    Last Post: 06-23-2014, 02:31 PM
  3. Replies: 10
    Last Post: 07-25-2013, 07:36 AM
  4. Form opens table in datasheet view
    By franklbl in forum Forms
    Replies: 9
    Last Post: 03-23-2011, 09:43 PM
  5. Clearing old table for repeat import
    By jasonbarnes in forum Import/Export Data
    Replies: 4
    Last Post: 02-13-2011, 04:00 AM

Tags for this Thread

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