• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

edit button

hello,
im trying to fix my edit button this is what I have

      Private Sub cmdEdit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdEdit.Click
            On Error Resume Next
            Enabled = False
        Load(frmAccountDetails)
            frmAccountDetails.Populate((lstAccounts.SelectedIndex))
            frmAccountDetails.Show()
      End Sub

but I get an error in Load(frmAccountDetails)
how can I fix it ?
0
aplelois
Asked:
aplelois
1 Solution
 
TimCotteeHead of Software ServicesCommented:
Hi aplelois,

VB.Net syntax is different to VB6:

     Private Sub cmdEdit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdEdit.Click
        Dim frmAD As frmAccountDetails
        frmAD = New frmAccountDetails
          frmAD.Populate((lstAccounts.SelectedIndex))
          frmAD.ShowDialog() ' This makes the new form modal so you don't need to disable the current form.
     End Sub

Tim Cottee
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now