Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008

    Unanswered: Subform: Need to know if data exists

    I've seen topics related to this, but none that have helped, so I thought I'd try again.

    I have a datasheet and a subdatasheet. The subdatasheet only very occasionally has any data in it, but it can be multiple lines for a single datasheet row.

    I need to give the user some information on whether there is associated data. I can do this either by turning off the "+" next to the main record (which doesn't appear to be possible) when there is no data or I can simply show on the main record how many lines of related subdatasheet data there is.

    Unfortunately, me.subform.form.recordcount doesn't seem to work unless the main datasheet is in form view mode. Once I put it in datasheet mode is gives me a #Name? error.

    dcount works fine, but makes everything unusably slow

    I could do it as a subquery on the main datasheet data source, but then the main datasheet wouldn't be editable.

    I'm stumped and haven't foiund a solution. Any help would be greatly appreciated.


  2. #2
    Join Date
    Dec 2008

    It appears to be impossible

    What I've found so far is that when I load the datasheet, the properties on the subdatasheet are not available unless the subdatasheet has been expanded. If I'm not mistaken, that means that I can NOT access any of the properties on the subdatasheet unless it has been expanded.

    As I said before, the DCount function is unacceptably slow. With that on the datasheet, performance slows to a crawl. Even data entry is not possible.

    I'll keep looking.

  3. #3
    Join Date
    Nov 2007
    Adelaide, South Australia
    Good luck.

    I never use datasheets because of their lack of controls, so I just want to suggest that what you are asking for may simply be impossible.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts