Textbox value on form "BeforeRender"

SDowse

Board Regular
Joined
Sep 23, 2009
Messages
107
Hi,

I have a form (from_TOC), with a Tab Control (tabCtl15) inside it, with a Page (DDValidation) and a textbox (Text7) on it...

In the form BeforeRender I want to put a calculation to set the value of Text7.

I have worked out how to do it for a textbox that does not sit with tabCtl15, but I cannot work out how to do it for a textbox within DDValidation. Any ideas.

I want Text7 = Format(DCount("[Account_No]", "qry_DD_Date_MisMiatch"), "#,#")

Thanks in advance for any help.
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

jackd

Well-known Member
Joined
Oct 19, 2006
Messages
1,259
Office Version
365
Do you get an error? Do you have some sample results? Is there a spelling error on MisMiatch?
Can you post a copy of the database with just enough data/info to highlight the issue?
 

SDowse

Board Regular
Joined
Sep 23, 2009
Messages
107
Hi - thanks for the reply.

1. I do not get an error - the box does just not populate with any value
2. There is a spelling error on MisMiatch as such, but that is replicated across the form. As this is just a sandbox, I am not to worried
3.. I will try and provide a copy of the database

However, whilst happily typing this post I was able to make a value populate in a textbox outside of the tabcontrol, using BeforeRender. But since writing this post I have not - for some reason it stops working, not sure why. I was switching between Design and Form view, and then closed the form and unable to get the BeforeRender to work on anything.

So, I have put the calculation into the OnLoad function - but this means the form takes too long to load. I have tried to Analyse Performance, but it's not made any difference. The query is only counting about 800 records (currently) so not sure why it is taking so long?
 

Watch MrExcel Video

Forum statistics

Threads
1,095,726
Messages
5,446,159
Members
405,387
Latest member
michmichmich2020

This Week's Hot Topics

Top