 |
If statment Help - Simon |
30-Nov-06 06:51:37
|
On my form i have a button that when it gets pressed it adds data to
the subform. the code works fine
I just want a if statment that will stop the code working if data
alredy existes in the subform.
If data exists i want a error message, if ther is no data let the code
run
Im not sure how to code it for it to see if there is data in the
subform
Any help will be great
Simon |
 |
| |
| |
|
| |
|
If statment Help - SJ |
30-Nov-06 09:58:20
|
Hopefully you've got a KEY field in the subform, an identifying field, a
primary key???
if you have then use code like
if isnull(Subform.Form.Primarykeyfield) then
you have no records
the Subform and Primarykeyfield need to be changed to be your apps names.
eg, InvoiceLines.Form.InvoiceNo |
 |
| |
|
|
| Function Sequnce Error |