Hi all i am try to pass the text input into the text boxes in form ( OrderScreen) into the text boxes in ( PrintOrderScreen)I don't get any error it just does not pass the text over to the second screen.
the text boxes with OS at the end belong to (OrderScreen : txtCustomerSurnameOS)
and the one without belong to Print order screen
Here is the code on print order screen:
Private Sub GetDetails()
With frmOrderScreen
txtCustomerSurname.Text = frmOrderScreen.txtCustomerSurnameOS.Text
txtCustomerForename.Text = frmOrderScreen.txtCustomerForenameOS.Text
txtCustomerAddress.Text = frmOrderScreen.txtCustomerAddressOS.Text
txtCustomerTown.Text = frmOrderScreen.txtCustomerTownOs.Text
txtCustomerPostcode.Text = frmOrderScreen.txtCustomerPostcodeOs.Text
txtCustomerTeleNo.Text = frmOrderScreen.txtCustomerTeleNoOs.Text
End With
End Sub
This is the code on Order Screen ( also DataAccess is how i link to a database encase your wondering):
Public Sub SaveCustomerDbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveCustomerDbtn.Click
Dim rep As Integer
If txtCustomerSurnameOS.Text = "" Then
rep = MsgBox("Please Input Surname", MsgBoxStyle.Critical)
txtCustomerSurnameOS.Focus()
Else
If txtCustomerForenameOS.Text = "" Then
rep = MsgBox("Please Input Forename", MsgBoxStyle.Critical)
txtCustomerForenameOS.Focus()
Else
If txtCustomerAddressOS.Text = "" Then
rep = MsgBox("Please Input Address", MsgBoxStyle.Critical)
txtCustomerAddressOS.Focus()
Else
If txtCustomerTownOs.Text = "" Then
rep = MsgBox("Please Input Town", MsgBoxStyle.Critical)
txtCustomerTownOs.Focus()
Else
If txtCustomerPostcodeOs.Text = "" Then
rep = MsgBox("Please Input Post Code", MsgBoxStyle.Critical)
txtCustomerPostcodeOs.Focus()
Else
If Not IsNumeric(txtCustomerTeleNoOs.Text) Then
rep = MsgBox("Please Input Telephone No", MsgBoxStyle.Critical)
txtCustomerTeleNoOs.Focus()
Else
dataAccess.CreateCustomer(txtCustomerSurnameOS.Text, txtCustomerForenameOS.Text, txtCustomerAddressOS.Text, txtCustomerTownOs.Text, txtCustomerPostcodeOs.Text, txtCustomerTeleNoOs.Text)
MsgBox("Customer saved", MsgBoxStyle.Information)
Me.Close()
frmPrintOrderScreen.Show()
End If
End If
End If
End If
End If
End If
End Sub
I can't figure out what i am doing wron any help would be great