1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access 20007 Record Display 1st record only

Discussion in 'Business Applications' started by Swampman, Sep 9, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. Swampman

    Swampman Thread Starter

    Joined:
    Aug 21, 2011
    Messages:
    18
    I have a form which has a subform called SearchMainSub with displays data from the following:

    Me![SearchMainSub].Form.RecordSource = MyRecordSource
    '
    'If no records match criteria, display message and move
    'focus to Clear button
    '
    If Me![SearchMainSub].Form.RecordsetClone.RecordCount = 0 Then
    'MsgBox "No Maintenace Records Found", 48, "No Records Found"
    Me!Clear.SetFocus
    Else
    '
    'Enable control in detail section

    The problem that I am having is that it only displays the first record. I have tired all of the options in the data field for RecordSet Type. It still only displays the first record. Anyone have any ideas? I hope this one is as easy as the other question I asked.
     
  2. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    How is the subform populated in the first place? Does it have it's own recordset based on an underlying query?
     
  3. Swampman

    Swampman Thread Starter

    Joined:
    Aug 21, 2011
    Messages:
    18
    Rockn,

    Yes, its data comes from an underlying SQL statement, SELECT * FROM Maintenance WHERE False; the false is changed to true and a field name "DeviceName" = "variable" where variable is determined from a user input into a unbound box. As in:

    SELECT * FROM Maintenance WHERE [DeviceName] = "MyCriteria"

    Does this help?
     
  4. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,840
    When you say it only displays one Record, is the form set to Continuous forms mode?
     
  5. Swampman

    Swampman Thread Starter

    Joined:
    Aug 21, 2011
    Messages:
    18
    It now works, with these modifications:
    First I removed all of the labels in the head of the subform. Closed up the header area.
    Headings are now on the main form.
    Shrank the subform until it was just one line of data showing.
    It now works....
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1016765

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice