| View previous topic :: View next topic |
| Author |
Message |
TheMaskedPencil Newbie
Joined: 15 Mar 2005 Posts: 4 Location: BC Canada
|
Posted: Jul 27th, 2005 11:00 PM Post subject: Refreshing a form |
|
|
Ok, I have been searching for the answer to this one. How do I get a form to refresh? I have tried Form1.Refresh() and Form1.Update(). The whole form and everything on it needs to refresh. I have looked on Google, I have search three different forums. The person who solves this will be a legend!
Thanks
The Masked Pencil _________________ Never underestimate the power of the mentally restricted. |
|
| Back to top |
|
jmcilhinney Freshman
Joined: 06 Jul 2005 Posts: 25 Location: Sydney, Australia
|
Posted: Aug 2nd, 2005 02:38 AM Post subject: |
|
|
| You just call Me.Refresh |
|
| Back to top |
|
TheMaskedPencil Newbie
Joined: 15 Mar 2005 Posts: 4 Location: BC Canada
|
Posted: Aug 2nd, 2005 01:04 PM Post subject: |
|
|
Nope doesn't work. I just want the form to reload so that the Load action is fired off again, but that doesn't do it. _________________ Never underestimate the power of the mentally restricted. |
|
| Back to top |
|
jmcilhinney Freshman
Joined: 06 Jul 2005 Posts: 25 Location: Sydney, Australia
|
Posted: Aug 2nd, 2005 06:06 PM Post subject: |
|
|
| There is a difference between refreshing a form, which means redrawing it, and reloading its data. The Load event is raised only once on each form. If you want to raise that event again you would need to close the current form and create a new instance. Why don't you take the code out of your Load event handler and put it in its own method. Then you can call that method from the Load event handler and any other time you need it. That's what methods are for. |
|
| Back to top |
|
TheMaskedPencil Newbie
Joined: 15 Mar 2005 Posts: 4 Location: BC Canada
|
Posted: Apr 22nd, 2006 11:09 PM Post subject: |
|
|
Well it has been a while but I figured out the problem. Rather than put the code that works directly under the forms Load area, just put the code in a function that is called when the form is loaded. It works for form loads, reloading a listbox that pulls from a database, and other odd problems. Try and see! _________________ Never underestimate the power of the mentally restricted. |
|
| Back to top |
|
jmcilhinney Freshman
Joined: 06 Jul 2005 Posts: 25 Location: Sydney, Australia
|
Posted: Apr 23rd, 2006 05:40 AM Post subject: |
|
|
| That's exactly what I told you to do six months ago. Did you read my post? |
|
| Back to top |
|
|