Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21839

No value given for one or more required parameters

$
0
0
Hi guys! Im having a problem from opening a database... i think the code was right.

DocListDummy is a ListBox that contains my doctors_id
DocsList is a ListBox that get (lname,fname,mname)

I want to open a record where doctors_id is equivalent to my DocsListDummy.Text
but im getting this problem. Any ideas? I badly need a help :(


Private Sub DocsList_Click()

Me.DocsListDummy.ListIndex = Me.DocsList.ListIndex

If Me.DocsList.ListIndex = Me.DocsListDummy.ListIndex Then

If rs.State = 1 Then rs.Close
rs.Open "Select * from tbldoctor where doctors_id = '" & Me.DocsListDummy.Text & "'", con, 3, 3

Dim pic As String
With Me
.lblDID.Caption = rs!doctor_id
.lblName.Caption = rs!dlname & ", " & rs!dfname & " " & rs!dmname
.lblAge.Caption = rs!age
.lblSpec.Caption = rs!specialty
pic = rs!dpic

If Me.DocsList.Text = "none" Then
.pbPic.Picture = LoadPicture(ppath & "nopic.jpg")
Else
.pbPic.Picture = LoadPicture(ppath & pic)
End If
End With
End If
rs.Close
End Sub

Viewing all articles
Browse latest Browse all 21839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>