Textbox value on form "BeforeRender"

SDowse

Board Regular
Joined
Sep 23, 2009
Messages
120
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.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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?
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top