

CODE
Dim u1, u2, u3, u, qx, cbol As String
Public Sub DG2cr()
DataGrid2.Caption = DataCombo1.BoundText + "'s Ingredients"
End Sub
Public Sub tstb()
u1 = "UPDATE ingredients AS i INNER JOIN madewith AS mw ON i.ingredientid=mw.ingredientid SET i.inventory = i.inventory"
u2 = "mw.quantity WHERE mw.itemid='"
u3 = "';"
Select Case DataCombo1.BoundText
Case "Chicken Salad"
txta.Text = u1 + u + u2 + "CHKSD" + u3
tstdz
Case "Fruit Salad"
txta.Text = u1 + u + u2 + "FRTSD" + u3
tstdz
Case "Fruit Plate"
txta.Text = u1 + u + u2 + "FRPT" + u3
tstdz
Case "Fruit Latte"
txta.Text = u1 + u + u2 + "FRTLT" + u3
tstdz
Case "Fruit Juice"
txta.Text = u1 + u + u2 + "FRTJC" + u3
tstdz
Case "Vegan Eatin'"
txta.Text = u1 + u + u2 + "VGNET" + u3
tstdz
Case "Veggie Latte"
txta.Text = u1 + u + u2 + "VEGLT" + u3
tstdz
Case "Veggie Juice"
txta.Text = u1 + u + u2 + "VEGJC" + u3
tstdz
Case "Millennium Salad"
txta.Text = u1 + u + u2 + "MILSD" + u3
tstdz
Case "Garden Salad"
txta.Text = u1 + u + u2 + "GDNSD" + u3
tstdz
Case "Chicken N Spuds"
txta.Text = u1 + u + u2 + "CKSDS" + u3
tstdz
Case "Orange Juice"
txta.Text = u1 + u + u2 + "ORNGJ" + u3
tstdz
Case "Pizza"
txta.Text = u1 + u + u2 + "PIZZA" + u3
tstdz
Case "Soda"
txta.Text = u1 + u + u2 + "SODA" + u3
tstdz
Case "Water"
txta.Text = u1 + u + u2 + "WATER" + u3
tstdz
End Select
End Sub
Public Sub tstdz()
dz
txta.Text = "select name,inventory,unit from ingredients"dz
End Sub
Public Sub tst()
csa = "select name,quantity,unit from madewith as mw,ingredients as i where (mw.ingredientid=i.ingredientid)and(itemid = '"csb = "')"
Select Case DataCombo1.BoundText
Case "Chicken Salad"
txtc.Text = csa + "CHKSD" + csb
DG2cr
Case "Fruit Salad"
txtc.Text = csa + "FRTSD" + csb
DG2cr
Case "Fruit Plate"
txtc.Text = csa + "FRPT" + csb
DG2cr
Case "Fruit Latte"
txtc.Text = csa + "FRTLT" + csb
DG2cr
Case "Fruit Juice"
txtc.Text = csa + "FRTJC" + csb
DG2cr
Case "Vegan Eatin'"
txtc.Text = csa + "VGNET" + csb
DG2cr
Case "Veggie Latte"
txtc.Text = csa + "VEGLT" + csb
DG2cr
Case "Veggie Juice"
txtc.Text = csa + "VEGJC" + csb
DG2cr
Case "Millennium Salad"
txtc.Text = csa + "MILSD" + csb
DG2cr
Case "Garden Salad"
txtc.Text = csa + "GDNSD" + csb
DG2cr
Case "Chicken N Spuds"
txtc.Text = csa + "CKSDS" + csb
DG2cr
Case "Orange Juice"
txtc.Text = csa + "ORNGJ" + csb
DG2cr
Case "Pizza"
txtc.Text = csa + "PIZZA" + csb
DG2cr
Case "Soda"
txtc.Text = csa + "SODA" + csb
DG2cr
Case "Water"
txtc.Text = csa + "WATER" + csb
DG2cr
End Select
End Sub
Private Sub Command1_Click()
End Sub
Private Sub Command3_Click()
On Error GoTo HE
u = "-"Adodc2.RecordSource = txtc.Text
dx
tstb
Command2.Enabled = True
Command4.Enabled = True
Exit Sub
HE:
MsgBox "Select Menu.", vbOKOnly + vbInformation, "Empty file"
DataCombo1.SetFocus
End Sub
Private Sub Command4_Click()On Error GoTo EHa
u = "+"
txtb.Text = "select name,quantity,unit from madewith as mw,ingredients as i where (mw.ingredientid=i.ingredientid)and(itemid = '')"
Adodc2.RecordSource = txtb.Text
dy
tstb
Command2.Enabled = False
Command4.Enabled = False
Exit Sub
EHa:
DataCombo1.SetFocus
Exit Sub
End Sub
Private Sub Command5_Click()
DEcon1.rsingredients.Update
End Sub
Private Sub Command6_Click()
Unload Me
End Sub
Private Sub DataCombo1_Click(Area As Integer)
tst
End Sub
Public Sub dx()
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
If DEcon1.ConRDB.State = adstateclose Then
DEcon1.ConRDB.Open
End If
rs.Open txtc.Text, DEcon1.ConRDB, 1, 3
Set DataGrid2.DataSource = rs
End Sub
Public Sub dy()
Dim rs1 As ADODB.Recordset
Set rs1 = New ADODB.Recordset
If DEcon1.ConRDB.State = adstateclose Then
DEcon1.ConRDB.Open
End If
rs1.Open txtb.Text, DEcon1.ConRDB, 1, 3
Set DataGrid2.DataSource = rs1
End Sub
Public Sub dz()
Dim rs2 As ADODB.Recordset
Set rs2 = New ADODB.Recordset
If DEcon1.ConRDB.State = adstateclose Then
DEcon1.ConRDB.Open
End If
rs2.Open txta.Text, DEcon1.ConRDB, 1, 3
Set DataGrid1.DataSource = rs2
End Sub
Private Sub Form_Load()
qx = False
Command2.Enabled = False
Command4.Enabled = False
End Sub