Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
'Vendosja e Furnizuesve ne Combo Box
Call dbconek
ar.Open "Select *From tblFurnizuesit", strConek, adOpenStatic, adLockOptimistic
If ar.RecordCount = 0 Then
Exit Sub
Else
ar.MoveFirst
Do While Not ar.EOF
txtfurnizuesi.AddItem ar!furnizuesi
ar.MoveNext
Loop
ar.Close
End If
End Sub
Private Sub txtfurnizuesi_Click()
lv.ListItems.Clear
txttotal.Text = ""
Dim rtotal As Currency
Call dbconek
ac.Open strConek
With ar
criteria = "Select * From tblFurnizimi Where furnizuesi like'" & txtfurnizuesi & "%'"
.Open criteria, strConek, adOpenStatic, adLockOptimistic
Do While Not .EOF
lv.ListItems.Add , , !pershkrimi, 1, 1
lv.ListItems(lv.ListItems.Count).SubItems(1) = Format(!qmimi, "###,###,##0.00")
lv.ListItems(lv.ListItems.Count).SubItems(2) = !sasia
lv.ListItems(lv.ListItems.Count).SubItems(3) = Format(!total, "###,###,##0.00")
lv.ListItems(lv.ListItems.Count).SubItems(4) = !Data
lv.ListItems(lv.ListItems.Count).SubItems(5) = !furnizuesi
.MoveNext
Loop
.Close
End With
'=============Paraqitja e Infos
Call dbconek
ac.Open strConek
With ar
criteria = "Select * From tblFatura Where fat_nr like'" & Text1 & "%'"
.Open criteria, strConek, adOpenStatic, adLockOptimistic
Do While Not .EOF
rtotal = rtotal + CCur(!total)
txttotal.Text = rtotal
.MoveNext
Loop
.Close
End With
End Sub
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu. https://get.cryptobrowser.site/30/4111672
I don't see anything in the code that changes the ViewMode to Reports (or Detail, it's been a while)... when it's in icon mode (which it appears to be in), it's not going to show the subitems... it will only show subitems when in Report(Detail) mode.
I don't see anything in the code that changes the ViewMode to Reports (or Detail, it's been a while)... when it's in icon mode (which it appears to be in), it's not going to show the subitems... it will only show subitems when in Report(Detail) mode.
-tg
Thank you for the fast replay , but can you please give me more info on how to change it to viewmode or a little guide
i did add a breakpoint ... but nothing happen except when i choose something from the list it does stop the code !! and still nothing appear !!!
please i just want it to get the list viewed !.
thanks
Given that you have now changed the View property of the ListView, the fact that you're not getting an 'Invalid Property Value" when you attempt to add the SubItems (because you haven't added any ColumnHeaders) would indicate that the SELECT is not returning any records. That implies that column 'furnizuesi' in Table 'tblFurnizimi' does not contain any values that match (i.e. start with the same characters as) the values of column 'furnizuesi' in Table 'tblFurnizuesit'.
I suggest you visually check those values in the Tables.
(Also, add ColumnHeaders to the ListView, perhaps in the Form_Load event - 1 ColumnHeader for each Column in the ListView - , to prevent the error when you do find something to add to the Listview)
EDIT:I have no idea why this code doesn't fail:
Code:
Call dbconek
ac.Open strConek
With ar
criteria = "Select * From tblFurnizimi Where furnizuesi like'" & txtfurnizuesi & "%'"
.Open criteria, strConek, adOpenStatic, adLockOptimistic
If strConek is an ADODB Connection object I'd expect the ac.Open to fail; if strConek is not an ADODB Connection Object I'd expect the .Open (for ar) to fail.
Is the code you posted, in Post#1, the actual code you're executing or just the 'edited highlights', or something completely different that you thought we might be interested in?
Hello Mr.Doogle thank you very much for the respond i am so glad you are here )
yes the code is the actual code i am executing .. and it returns no error at all.. , but it doesn't show anything in the list .. because it saves nothing in the dbase, but i add some value to the dbase manually and the same it doesn't shows at all...
I fixed the dbase .. Furnizimi , and i add it manual then it appears in the program when i execute..
But the total not working for some reason
Anyway i have a new idea ... What if i get the data from another dbase not the furnizimi but the maine dbase and all culomn are exit except the barcode... I will try and return to inform if i get new issue ... Thank u so much for the responses