Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Box Double Click Event

Status
Not open for further replies.

jeremy0028

Technical User
Oct 9, 2005
37
0
0
US
Is there any why i can double click the Insurance Name in the List box and insert that Name into the Primary Or secondary Insurance Text Fields on the form called frmPatients

I do not want to use combo Boxs


I have a main form call frmpatients which is the loaded form

on that form i have 2 text boxes

one called Primary Insurance
2nd called Secondary Insurance

above those text boxs i have a hyper link which opens
a form call frmInsuranceSearch which is the list box


For the list box i have the following in a text box
called txtSearchString in the on change event which searches for insurance Name or ID in the database

Private Sub txtSearchString_Change()
Dim vSearchString As String

vSearchString = txtSearchString.Text
Search.Value = vSearchString
Me.List0.Requery

End Sub

the List Box itself gets its information for a qry
Code for list box
SELECT [qryInsurance].[InsuranceID], [qryInsurance].[InsuranceName], [qryInsurance].[Address], [qryInsurance].[Address2], [qryInsurance].[City], [qryInsurance].[State], [qryInsurance].[Zip], [qryInsurance].[Phone] FROM [qryInsurance];


 
How about something like:
Code:
Private Sub List0_DblClick(Cancel As Integer)
Forms!frmpatients.[Primary Insurance] = Me.List0.Column(1)
End Sub


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top