Results 1 to 5 of 5
  1. #1
    RAJESHKUMAR R is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    48

    Textbox to Display a Specific Text till Query Runs

    Dear Friends,

    I have text box in a Form, which is designed to display count of Records from a Particular Query i.e. “FR_FO”

    I am using below formula in Control Source (Design Mode), which gives correct result!

    =Format(DCount("[Part_Number]","[FR_FO]"),"00000")

    However, The Concern are support I am looking for here is, when I open the Form (No Query Result Run yet in the File), I would need a display like “Run Query”. Once the user Runs the Query then count of Rows to be displayed on the same text box!



    Looking forward your valuable suggestion for the same!

    Thanks & Regards,
    Rajeshkumar R

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    I would suggest doing the following
    1. use a label with a caption saying run query or similar.
    2. add a button with code to run the query
    3. when completed, disable the button, change the label caption to query results and show a hidden textbox with the result
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Or you can use an IIf() function that tests the DCount(). If zero display your text, otherwise the count.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    RAJESHKUMAR R is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    48
    Dear Friends,

    Thanks for your valuable suggestion! It works fine!

    Thanks & Regards,
    Rajeshkumar R

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Glad you got it working.
    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. Replies: 4
    Last Post: 05-18-2016, 03:32 PM
  2. Replies: 1
    Last Post: 06-18-2014, 09:39 PM
  3. Replies: 3
    Last Post: 08-18-2011, 07:31 AM
  4. Replies: 2
    Last Post: 11-16-2010, 10:55 AM
  5. hide text box till you un-tick check box
    By islandboy in forum Access
    Replies: 14
    Last Post: 09-06-2009, 10:08 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