0

I need to finish my project using Microsoft Visual Studio 2017 and Microsoft Access as the database.

There is a frmCustomer where the customer needs to enter their credentials and click a SAVE button and it will save the data to the database. Then, when the RECEIPT button is clicked, it will open another form named frmReceipt to display the receipt.

I don't know the code how to do it.

If anyone can help me I'll will be truly thankful.

frmCustomer

Private Sub btnReceipt_Click(...)Handles btnReceipt.Clik
    frmReceipt.Show()
    Me.Hide()
End Sub

frmReceipt

Private Sub Receipt_Load(...)Handles MyBase.Load

    Dim strSql As String = " SELECT * FROM customer where 
    Dim strPath As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:User\Admin\Documents\Customer.mdb"
    Dim cust As New OleDb.OleDbDataAdapter(strSql,strPath)

    lblNameAns.Visible = Trur
    'lblNameAns.Text = NameTextBox1.text

NameTextBox1 is taken from the frmCustomer

The rest I can't figure out.

Lee Mac
  • 15,615
  • 6
  • 32
  • 80
Nisha
  • 15
  • 4
  • Does this answer your question? [How do I create a parameterized SQL query? Why Should I?](https://stackoverflow.com/questions/542510/how-do-i-create-a-parameterized-sql-query-why-should-i). Pass value as sub argument and use it in a parameter. – June7 Dec 27 '19 at 13:36
  • A question on SO needs to be focused on one specific thing. The title alone is clear evidence that this question is NOT focused. There are about four or five different tasks in there. The reason you have trouble is because you don't break a problem down into parts and tackle each part individually. When you do that, you can actually search for something sensible for each part. – jmcilhinney Dec 27 '19 at 13:49
  • Thank you for the reply & also the one that editted my question the link given do help a lot , but act i forget to use the method passing from one form to another . Thank you for realising me that i need to break the problem into smaller parts , it does help a lot thank you again everyone ✌ – Nisha Dec 27 '19 at 14:03

0 Answers0