I've been having trouble getting parametrised queries to work. The code is working fine without parameterised SQL.
The error I'm getting is Must declare the scalar variable @RegNo.
Dim conn As New SqlConnection("Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\dbsBank.mdf;Integrated Security=True")
Dim queryString As String = "SELECT PAC FROM Customers WHERE Registration_No = @RegNo"
Dim cmd As New SqlCommand(queryString, conn)
Dim param As SqlParameter = New SqlParameter("@RegNo", SqlDbType.Int)
param.Value = mtbPassword.Text
cmd.Parameters.Add(param)
Dim adap As New SqlDataAdapter(queryString, conn)
dTable = New DataTable
Try
    adap.Fill(dTable)
Catch ex As Exception
    MessageBox.Show(ex.Message)
End Try

)at the end of your query.Commandobject but never using it. That is the reason for the error.