I have 5 forms after the first initial login form which i believe to be correct
You are to enter customer details which so far i believe to correct(all fields must be filled)
I then have a Service or repair screen whichever the user wants.
on the repair screen i have a checkedlistbox with repair types in.
anyway after all of this i have a calculate button on either service and repair screen and i want to know how to
pass all customer details and repair or service onto an invoice displaying the cost of
the service or repair Inlcuding VAT and Hourly rate
[Module Var
Public Title As String
Public Surname As String
Public FirstName As String
Public Address As String
Public Postcode As String
Public Phonenumber As String
Public carModel As String
Public carRegistration As String
End Module
]
i have a module like this but i do not understand how to use it here is my customerdetail form coding
[Public Class CustomerDetail
Dim warning As String
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub btnRestart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRestart.Click
cmbTitle.Text = ""
cmbCM.Text = ""
txtAddress.Text = ""
txtCR.Text = ""
txtFirst.Text = ""
txtPhone.Text = ""
txtPostcode.Text = ""
txtSurname.Text = ""
Me.Hide()
Main.Show()
End Sub
Private Sub btnContinue_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnContinue.Click
If Len(cmbTitle.Text) >= 2 And
Len(txtFirst.Text) >= 4 And
Len(txtAddress.Text) >= 7 And
Len(txtPhone.Text) >= 9 And
Len(cmbCM.Text) >= 1 And
Len(txtSurname.Text) >= 4 And
Len(txtCR.Text) >= 1 Then
Me.Hide()
AfterCustomerDetails.Show()
Else
If txtSurname.Text = "" Then
warning = "No Surname Has Been Entered" & vbCrLf
End If
If cmbTitle.Text = "" Then
warning = "No Title Has Been Entered" & vbCrLf
End If
If txtFirst.Text = "" Then
warning = warning & "No Name Has Been Entered" & vbCrLf
End If
If txtAddress.Text = "" Then
warning = warning & "No Home Address Has Been Entered" & vbCrLf
End If
If txtPhone.Text = "" Then
warning = warning & "No Home Number Has Been Entered" & vbCrLf
End If
If cmbCM.Text = "" Then
warning = warning & "No Car Model Has Been Entered" & vbCrLf
End If
If txtCR.Text = "" Then
warning = warning & "No Car Registration Has Been Entered" & vbCrLf
End If
If txtPostcode.Text = "" Then
warning = warning & "No Car Registration Has Been Entered" & vbCrLf
End If
MsgBox(warning)
End If
warning = ""
End Sub
Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
cmbTitle.Text = ""
cmbCM.Text = ""
txtAddress.Text = ""
txtCR.Text = ""
txtFirst.Text = ""
txtPhone.Text = ""
txtPostcode.Text = ""
txtSurname.Text = ""
End Sub]
have i done this correct to be able to pass the information?
2 Replies - 229 Views - Last Post: 14 May 2012 - 02:18 AM
Replies To: taking data from one form to another (no database)
#2
Re: taking data from one form to another (no database)
Posted 14 May 2012 - 02:02 AM
their are a lot of solutions..
you can put your variables in a module or
you can use properties which i think is the best practice
you can put in a separate class or in the form itself
how to put value?
just call it
to access it in another form
you can put your variables in a module or
you can use properties which i think is the best practice
private _itmValue as string public property ItmValue as string get return _itmValue set (value as string) _itmValue=value end property
you can put in a separate class or in the form itself
how to put value?
just call it
ItmValue="dasdas"
to access it in another form
label1.text=form1.ItmValue
#3
Re: taking data from one form to another (no database)
Posted 14 May 2012 - 02:18 AM
ummm thanks but i do not understand a thing you are saying
i
fail....
i
fail....
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|