Results 1 to 3 of 3
  1. #1
    Join Date
    May 2019

    Record Count in a Macro

    I have a search form which leads to a search query and then to a multi-record form displaying the matches (result of the query). After the selecting a specific record, it then opens a a single record form. What I want to do is go directly from the query to the single record form if it only finds one matching record. I don't want to use VBA. Any suggestions?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    The Great Land
    Code behind search form would have to determine if there will be more than 1 record then open appropriate form.
    I don't use macros but
    I think macros can use domain aggregate functions.
    How to attach file: To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Ontario, Canada
    I don't know what 'leads to a query' means, but if the query only returned 1 record based on search criteria, where the count of some field is 1, then just open a form to that query result? If the count doesn't = 1 there'd be no query result. I don't use macros either, so am not sure how difficult it is to ascertain things like whether or not a query returns records thus should or should not open a form but rather show a message.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

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

Similar Threads

  1. Count Record
    By JakeL in forum Access
    Replies: 4
    Last Post: 05-03-2019, 08:09 AM
  2. Replies: 4
    Last Post: 01-15-2019, 11:50 AM
  3. Replies: 5
    Last Post: 02-24-2017, 08:09 AM
  4. Updating Multiple Record Form Based on Record Count
    By William McKinley in forum Forms
    Replies: 2
    Last Post: 12-31-2014, 12:45 PM
  5. Replies: 30
    Last Post: 08-15-2012, 02:25 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 - Senior Forums