By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,640 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,640 IT Pros & Developers. It's quick & easy.

Opening new Form from a selected listview item (VB.NET)

P: 1
Hi, i used in MS ACCESS 2007/2010 this code to open a new form (with a new table) when hit double click over a listview valeu, fexp, i had a listview with names and when i double click a name a had a new form with this name data. I dpn't know how to re-write it for VB.NET and i need help from anu=yone. Thanks a lot. (Ivan, Brazil)

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  3. Private Sub Lista31_DblClick(Cancel As Integer)
  4.  If Not IsNull(Lista31) Then
  5.       AShowRecord_Click
  6.  End If
  7. End Sub
  9. Private Sub AShowRecord_Click()
  10. 'Find a selected record, then close the search dialog box
  11.     DoCmd.OpenForm "frm_DadosCadastrais_Iniciais", , , _
  12. "tbl1_DadosCadastrais.Nome=" & "'" & Me.Lista31.Column(1) & "'"
  13. Me.Requery
  14. DoCmd.Close acForm, "frm_Exames_DopplrObst_7dias"
  15. End Sub
Mar 24 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.