
his is acode!!
Private Sub cmdingre_Click()
Set de.rsfind.DataSource = Nothing
Set de.rsfind.DataSource = de
Dim an
Dim n
With de.rsfind
if .State = adStateClosed Then
.Open
End If
If .RecordCount = 0 Then
txt1.Text = "No section"
Else
an = txt1.Text
.Filter = " menuid Like '" & an & "%' "
If .EOF Then
Else
.MoveFirst
While Not .EOF
n = n + .Fields("Price").Value
.MoveNext
Wend
End If
End If
End With
Set DataGrid1.DataSource = Nothing
Set DataGrid1.DataSource = de
txt2.Text = n
ERD table
tblingredients
sample output
main form
tbltransactions

No comments:
Post a Comment