Working with VB.Net
The problem is the end user wanted a custom message box to pop up in the middle of an action under the click of a button..
They click the button and a I have custom message box to pop up... I use this code to display it..
fMsgBoxPos.ShowDialog()
lnReceiptAction = fMsgBoxPos.lReceiptPrint
On the form the user is asked if they want to print a receipt and a yes/ no either a 0 or 1 is sent back to the main form and a receipt is/is't print...this works...
The problem is once this action is complete I want the focus to go back to a textbox on the main form...this was working, but since I added the fMsgBoxPos.ShowDialog(), I can't get the focus to appear in the textbox
On the custom form..this is the code I have under the Yesy/ No buttons
'yes button on the click action on custom form
lReceiptPrint = 1
Me.Close()
it seems like when I close the custom form the focus stays there and doesn't go back to the textbox I want ...
this is the code for the set focus call..
'main form
txt_Invoice.Focus()
txt_Invoice.Text = ""
txt_Invoice.Focus()
Any help or insight would be much appreciated...
Start Free Trial