Ako table kai 2 ang foreign key, ang column item_num og flower_id kai pareha sila foreign key...
so ako question kai if ako i add and
001 na item number sa
item_num then ako pajud siya ma add sa flower_id na column,,, Unsaon naku pag trap na dili siya dapat ma add sa flower_id na column?
Here is my Save Code
Code:
If TxtItemNu.Text = "" Then
MsgBox "No Item Number entered.", vbOKOnly + vbCritical, "ERROR: Empty field/s. "
' TxtItemNu.SetFocus
Exit Sub
End If
If TxtFlowerID.Text = "" Then
MsgBox "No Flower ID entered.", vbOKOnly + vbCritical, "ERROR: Empty field/s. "
' TxtFlowerID.SetFocus
Exit Sub
End If
If CboQuantity.Text = "" Then
MsgBox "No Quantity entered.", vbOKOnly + vbCritical, "ERROR: Empty field/s. "
CboQuantity.SetFocus
Exit Sub
End If
On Error GoTo ErrSave
Dim sqlStr As String
sqlStr = "Insert Into STRUCTURE(STR_ITEMNO,STR_FLOWER,STR_QTY) values(" & TxtItemNu.Text & "," & TxtFlowerID.Text & "," & CboQuantity.Text & ")"
Conn.BeginTrans
Conn.Execute sqlStr
Conn.CommitTrans
MsgBox "STRUCTURE successfully saved!"
CmdSave.Enabled = False
CmdDelete.Enabled = False
ClearText
Unload Me
Form1.Show
ExitErr:
Exit Sub
ErrSave:
Conn.RollbackTrans
MsgBox "Error" & Err.Description, vbCritical
Resume ExitErr
pasinsya na kai dili kaayu ko maayu na programmer hehehe, but please help me kai i really need it jud...
![Sad](images/smilies/sad.gif)
![Sad](images/smilies/sad.gif)