Results 1 to 4 of 4
  1. #1
    mikeone610 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    39

    Help with Onclick event to refresh textbox.

    I have a textbox which I need to refresh when my Query is refreshed. Currently I only have the ability to requery with a Button but when that button is pushed I also want a text box to be refreshed. This is what I have currently in my On Click property of the requery button:

    =[SearchSubformNew].[Requery]

    Is it possible to have 2 On Click events? If so I just wanted to add the line to refresh my textbox which is named SummaryText. Any help I would really appreciate.

  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,518
    Well, you can't have 2 of the same event, but you can do more within the event. You need to be in VBA:

    http://www.baldyweb.com/FirstVBA.htm

    then in that code you could requery both items.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    mikeone610 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    39
    Awesome! Thanks a ton it worked perfectly. Does this mean I am a Hackerz now? Lol just kidding nice site.

    EDIT: And why I got you here can I just ask a simple question? I there a Mode (like in arithmetic) function in Access? I can't seem to find it's existence anywhere.

  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,518
    Not that I'm aware of, though it's not a function I was familiar with. A quick search confirms that, but offers a query as a replacement:

    SELECT TOP 1 FieldName
    FROM TableName
    GROUP BY FieldName
    ORDER BY COUNT(*) DESC

    You could certainly write a custom function that did it, similar to these:

    Minimum or Maximum Value Across Fields of Record

    Yours would obviously be more complicated, as it would have to keep track of the counts somehow.
    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. OLEunbound onclick event
    By thangasiva in forum Forms
    Replies: 1
    Last Post: 03-26-2015, 10:55 AM
  2. OnClick Event submit and clear
    By Desstro in forum Forms
    Replies: 1
    Last Post: 01-12-2011, 09:42 AM
  3. Onclick event
    By tmcrouse in forum Forms
    Replies: 3
    Last Post: 09-18-2010, 01:10 PM
  4. OLEunbound onclick event
    By thangasiva in forum Access
    Replies: 1
    Last Post: 06-27-2010, 01:49 PM
  5. OnClick event
    By HotTomales in forum Forms
    Replies: 1
    Last Post: 12-24-2009, 08:10 PM

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