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.
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.