X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V < 1 2  (Go to first unread post)
   Reply to this topicStart new topic
> Vba / Dcount Produces Error 2427, Access 2003    
post Jun 19 2019, 03:47 PM

UtterAccess VIP
Posts: 9,737
Joined: 25-October 10
From: Gulf South USA

While the On Activate may give you what you want, now that we know what you want to use this for, I agree with theDBguy that you should consider looking into the On No Data event.


"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
post Jun 20 2019, 05:21 AM

Posts: 108
Joined: 5-August 05
From: Eastbourne, UK

Use HasData property - see https://www.tek-tips.com/viewthread.cfm?qid=1529666
Go to the top of the page
post Jun 20 2019, 07:14 AM

Posts: 477
Joined: 10-November 05
From: The Netherlands

So finally, with the help of many (for which I am very gratefull) I found a solution.
Or maybe I should say I found a workaround.

What I did:
I left the subreport on the same place on the mainreport
Under that subreport I put a label with "No data available"
In the NoData event from the subreport I put the code
If me.hasdata Then
   me.Visible = True
   me.Visible = False

So far so good, except that the label under the subreport was visible, even with data in the subreport.

To correct this I fiddled a little with the reports background but apparently white regarding backgrounds means it is transparent.
Next step was to define a new background color
Normally all 3 colors are set to 255 (making it white)
I changed all 3 to 254 (maybe changing 1 was enough)
Now the background color is still white, but not transparent.

It took a while, and maybe it is not the prettiest of solutions but it works.

1 question remains: why does Access does not recognize the value of me.txtPersonID while I can see it ?

Anyway: I have a solution that works for me, thanks you again to everybody that helped me
Go to the top of the page
post Jun 20 2019, 10:38 AM

Access Wiki and Forums Moderator
Posts: 75,725
Joined: 19-June 07
From: SunnySandyEggo

Hi Hein. Glad to hear you found a solution. Good luck with your project.

Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
2 Pages V < 1 2

Custom Search

RSSSearch   Top   Lo-Fi    21st July 2019 - 09:02 AM