hello
how I can update two table
I have
table 1 -tabman
table 2 -subtable
and I'm using this code for this
the table 1 -tabman
update successful
but table 2-subtable not update
what I can do for this
how I can update two table
I have
table 1 -tabman
table 2 -subtable
and I'm using this code for this
Code:
Private Sub updt_Click()
If IsNull(fnumber) Then
If MsgBox("?", vbCritical + vbOKOnly, "?") = vbOK Then
End If
fnumber.SetFocus
Exit Sub
End If
If DLookup("no_itm", "tabman", "no_itm ='" & fnumber & "'") = fnumber Then
DoCmd.RunSQL ("UpDate subtable Set nameOrder = forder ")
DoCmd.RunSQL ("UpDate tabman Set name_q = fnume , namePice = fwohd ,loc1 = floca , total = ftotal ,date_ins = fdateisd Where tabman.no_itm = [fnumber] ")
Else
DoCmd.RunSQL ("Insert Into subtable (nameOrder ) Values (forder) ;")
DoCmd.RunSQL ("Insert Into tabman (no_itm,name_q,namePice,loc1,total,date_ins) Values ( fnumber,fnume,fwohd,floca,ftotal,fdateisd) ;")
End If
Call Cls_Click
End Sub
the table 1 -tabman
update successful
but table 2-subtable not update
what I can do for this