How to reload a form?
Hello guys, I'm trying to reload a form displayed by using a simple button.
The sentence I was trying to use is: Form1_load() but I'm getting this error:
"Error 2 Argument not specified for parameter 'e' of 'Private Sub Form1_Load(sender As Object, e As System.EventArgs)'."
Can any of you please tell me what is that argument I'm not passing?
or any other way to reload my form using a button?
Thanks sooo much for your help...it will be much appreciated!
Best regards from Costa Rica!!!
Or you could do the following:
OnLoad(EventArgs.Empty);
However, you need to ask yourself what you are trying to achieve. Calling Form1_Load again will only run your code again within the method, it won't reset the form's controls to default values.
Hey, thank you very much for your replies...

I appreciate the warning also but the form I'm doing is quite simple and all I need is just to reload the form clicking the button; eventhough it won't reset the controls.
Again thank you very much!
Cheers,
Just a heads up for those of you wishing to completely reload the form including all controls. You can close it and reopen it within your method. Code looks like this:
DoCmd.Close acForm, "FormName"
DoCmd.OpenForm "FormName"
Make sure you replace FormName with your form's name though 