i m using two list box one(check style list box) is for food item another(simple list box) is for cost.when i selects any fooditem then a input will occour for entry of food quantity.and after selecting all items and entry of their quantity they will store in ms access databse.
please help me for this project coding....

This sounds like you need help for the entire project, which unfortunately we do not do here. You need to show us what you have already in code, then we can help i9f any errors occur.:)

when i select option button of fastfood it retrieve the data in two listbox.
i m using two list box one(check style list box) is for food item another(simple list box) is for cost.when i selects any fooditem then a input will occour for entry of food quantity.and after selecting two item the input box occur before checked 3rd item and it multiply with previous item cost instead of current item's cost.
please check this error.......
this is my coding

Dim rs As New ADODB.Recordset
Dim i As Integer
Dim var As Integer

Private Sub Form_Load()
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=g:\ak.mdb;Persist Security Info=False"
rs.Open " select* from table1", con, adOpenDynamic, adLockOptimistic

End Sub

Private Sub List1_Click()
For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then
var = InputBox("enter quantity")
lstcost.AddItem var * (List2.List(i))

End If
Next i


End Sub
Private Sub Command1_Click()
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
Form1.lstfood.AddItem List1.List(i)

End If
Next i

End Sub

Private Sub Option1_Click()

If rs.State = adStateOpen Then
rs.Close
End If
rs.Open "select productname,cost from table1 where category='ff'"

If Not rs.EOF Then rs.MoveFirst
Do While Not rs.EOF
List1.AddItem rs!ProductName
List2.AddItem rs!cost

rs.MoveNext
Loop
rs.Close

End Sub

I'll post a solution tomorrow morning. Off to home now.;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.