By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,155 Members | 638 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,155 IT Pros & Developers. It's quick & easy.

Forcing a form to reload

devonknows
100+
P: 137
hi ive got this at the end of my settings page, and i want it show the fmrSearch form change the check1.value, but everytime i do it, it takes two or three attempts for it to change (having to go back into settings and press ok again) so i put fmrsearch.refresh inhope that it would refresh the form and update the Check1.value. but it doesnt is there anywya i can force my form to reload? so it reloads all the form_load values?. please let me know

Kind Regards
Devon,

Expand|Select|Wrap|Line Numbers
  1. fmrSearch.Show
  2. If Combo1.Text = "yes" Then
  3. fmrSearch.Check1.Value = 1
  4. Else
  5. If Combo1.Text = "no" Then
  6. fmrSearch.Check1.Value = 0
  7. End If
  8. End If
  9. conn.Close
  10. Unload Me
  11. fmrSearch.Refresh
  12. End Sub
  13.  
Dec 5 '06 #1
Share this Question
Share on Google+
1 Reply

P: 30
hi ive got this at the end of my settings page, and i want it show the fmrSearch form change the check1.value, but everytime i do it, it takes two or three attempts for it to change (having to go back into settings and press ok again) so i put fmrsearch.refresh inhope that it would refresh the form and update the Check1.value. but it doesnt is there anywya i can force my form to reload? so it reloads all the form_load values?. please let me know

Kind Regards
Devon,

Expand|Select|Wrap|Line Numbers
  1. fmrSearch.Show
  2. If Combo1.Text = "yes" Then
  3. fmrSearch.Check1.Value = 1
  4. Else
  5. If Combo1.Text = "no" Then
  6. fmrSearch.Check1.Value = 0
  7. End If
  8. End If
  9. conn.Close
  10. Unload Me
  11. fmrSearch.Refresh
  12. End Sub
  13.  
you are coding in which form? frmsearch?

Expand|Select|Wrap|Line Numbers
  1. "Unload Me
  2. fmrSearch.Refresh"
  3.  
make frmsearch.show and frmsearch.refresh again to see the checkbox being changed.

another way is do it is,
create a module, initialize your form object

Expand|Select|Wrap|Line Numbers
  1. Option explicit
  2. Public g_frmSearch As frmSearch
  3.  
  4. Public Sub Main()
  5. Set g_frmSearch = new frmSearch
  6. 'which ever form you want to startup put that form name followed show property
  7. ex: frmMain.show
  8. End Sub
  9.  
Set your project property to start in Sub Main()

and in your project replace frmSearch to g_frmSearch

this can for sure get behavior what you are looking for...
Dec 5 '06 #2

Post your reply

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