C
cmweb via AccessMonster.com
In a form named PRODUCTION there are 3 text box for invoice data: xtype,
xserie, xnumber
I need valid this data from the INVOICE table, where its key is a compound
key (TPINV+SERINV+NUMINV)
I tried with
Private Sub xnumber_AfterUpdate()
Dim searchinv as string
searchinv=Dlookup("*","[Invoice]", [tpinv]="& Forms![production].[xtype] and
[xserie]= &Forms![production].[xnumber] and "&Forms![xnumber]
If searchinv ="" then
MsgBox ("Invoice doesn't exist'")
Cancel = True
End If
End Sub
.... but it doesnt work
Please help me
Thanks in advance
xserie, xnumber
I need valid this data from the INVOICE table, where its key is a compound
key (TPINV+SERINV+NUMINV)
I tried with
Private Sub xnumber_AfterUpdate()
Dim searchinv as string
searchinv=Dlookup("*","[Invoice]", [tpinv]="& Forms![production].[xtype] and
[xserie]= &Forms![production].[xnumber] and "&Forms![xnumber]
If searchinv ="" then
MsgBox ("Invoice doesn't exist'")
Cancel = True
End If
End Sub
.... but it doesnt work
Please help me
Thanks in advance