|
-
Feb 16th, 2007, 07:21 AM
#1
Thread Starter
New Member
agh n00b problems!
hey all iam a total noob at vb need a bit of help......
Private Sub cmd_cancel_Click()
MsgBox "Are you sure you want to cancel your order?", vbYesNo, "Cancel Order?"
If vbYes Then
frm_page1.Refresh
frm_page0.Visible = True
frm_page1.Visible = False
End If
End Sub
frm_page1.refresh isnt refreshing page... plz help.... ta.
-
Feb 16th, 2007, 07:26 AM
#2
Re: agh n00b problems!
Welcome to the Forum 
Something like:
VB Code:
Option Explicit
Private Sub cmd_cancel_Click()
[b]If[/b] MsgBox("Are you sure you want to cancel your order?", vbYesNo [b]+ vbQuestion[/b], "Cancel Order?") = vbYes Then
frm_page1.Refresh
frm_page0.Visible = True
frm_page1.Visible = False
End If
End Sub
NB: Added a question mark too.
-
Feb 16th, 2007, 07:28 AM
#3
Re: agh n00b problems!
Welcome to the forums. 
Refresh cause's a repaint of a form or control. This might not be what you think refresh should be doing (Refresh does not work on MDI Parents, but will on MDI Child forms).
What are you attempting to do with the refresh?
-
Feb 16th, 2007, 07:42 AM
#4
Thread Starter
New Member
Re: agh n00b problems!
just trying to refresh the page option boxes
-
Feb 16th, 2007, 07:44 AM
#5
Re: agh n00b problems!
 Originally Posted by remo656
just trying to refresh the page option boxes
Again I ask, what do you mean by "refresh"? Change? Set?
What are "option boxes"? Option Buttons? Checkboxes?
-
Feb 16th, 2007, 07:51 AM
#6
Addicted Member
Re: agh n00b problems!
As hack says the forms Refresh method does not re-initialise any data on the form, it only repaints the form. You have to do that yourself, i.e.
VB Code:
txtAmount.Text = vbNullString
optOption1.Value = False
If a post has been helpful, Rate it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|