Results 1 to 2 of 2
  1. #1
    sharonir22 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    May 2015
    Posts
    16

    return value


    hi,
    I'm trying to set something based on the result of a query, meaning that if there are no results one form open, and if there is a result a different form opens.

    how can I reffer to a result of a query in a form?
    *just to clarify- my query always returns 1 or 0 results.
    thnx

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    One way is to count the records returned by query before proceeding to open the form -
    If DCount("*","YourQueryName")=0 Then
    'Do this
    Else
    'Do something different
    EndIf

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

Similar Threads

  1. Replies: 9
    Last Post: 08-19-2014, 12:41 PM
  2. Return to frm_menu NOT
    By SemiAuto40 in forum Programming
    Replies: 6
    Last Post: 10-07-2011, 12:43 PM
  3. Specify return value
    By Desstro in forum Queries
    Replies: 2
    Last Post: 06-19-2010, 02:12 AM
  4. Tax Return Application
    By Hobbledehoy in forum Access
    Replies: 1
    Last Post: 04-18-2010, 05:41 AM
  5. Return value of row above
    By marimar1097 in forum Access
    Replies: 7
    Last Post: 10-20-2009, 08:06 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