473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Form Load does not trigger

134 100+
Hi, I am new to vb6.
I have some code written in the form load. the first time when I call the form, the code inside form load will activate.
After I have complete the form and return to main menu, the 2nd time when I call the form, it does not trigger the code in the form load, I put a debugging point on the code in the form load, but it not trigger, any idea what wrong ?
Jul 10 '08 #1
3 1977
debasisdas
8,127 Expert 4TB
kindly post your code here for reference of our experts.
Jul 11 '08 #2
Hi,
Seeing your code would have helped. I think you problem is that:
PROBLEM:
form_load() event is triggered only when the form is brought into memory(RAM) from the hard disk, where it exists as a file. So, when you 'switch back' to the form (e.g. by ALT-TAB), then this event is not raised.
SOLUTION1 :
put the code from form_load() to the Form_Activate() event of the form. This event is triggered when you 'activate' the form by ALT-TAB or mouse click etc.
SOLUTION2 :
This is bit less practical, and I would suggest to stick to previous solution.
Unload the form(CODE : Unload Form) when you switch to the other form, and load (CODE: Load Form) when you switch back to the previous one. In this way, the form_Load() event will be triggered again.

Think that should solve your problem, if I understood it right.

Bye.
Jul 12 '08 #3
I don't know how you have left the form, but if it is using the "Form.hide" command, this means that the form is still loaded, and when you come back to it, the program believes it has already done what you wanted. If this is the case, use "Unload Form1" instead of "Form.Hide".
Jul 15 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mavis | last post by:
Seems the XMLBulkload does not support the "Trigger". But I really need to execute some rules after bulk load, anyone can give me some hints about this? I wonder whether I can fire a trigger in my...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
6
by: fumanchu | last post by:
I've got to let end users (really just one person) load billing batch files into a third party app table. They need to specify the billing cycle name, the batch name, and the input file name and...
7
by: | last post by:
I am having trouble figuring out to call a database INSERT procedure from a simple submit form. It appears I should use the onclick event to trigger the procedure called BUT when I do this I...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
1
by: keith.walter | last post by:
My first asp.net app is almost "done" and I am stuck. Here is my situation: I have a "mother" page add_customer.aspx and a"child" user control add_group.ascx. On the mother page is an "add...
3
by: Ronald S. Cook | last post by:
In my Win app, I'm needing to load a media file into my Windows Media Player control, and THEN read an attribute from the file. The thing is, the file has to be playing for a split second before...
15
by: Kevin Davis | last post by:
Hello, I'm a new person when it comes to PHP and I have a quick question. I would like to create a form that will allow the user to add more information using the same form in case they have...
2
by: Doug | last post by:
Hi all, I have an issue with SET INTEGRITY after loading my table. Set integrity does not see integrity violations checking by trigger. My shell script does the following steps: - LOAD FROM ......
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.