how to open form Add items when the item is not exists?

siamandm
BronzeLounger
Posts: 1224
Joined: 01 May 2016, 09:58

how to open form Add items when the item is not exists?

Post by siamandm »

Hello All,

if I have a form to add items to a table, and if the item is not recorded in the tbl_items, how to check the item is not exist and open form to record items.?


Regards

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Re: how to open form Add items when the item is not exists?

Post by burrina »

If DCount("SomeFieldName", "SomeTable", "SomeField=Forms!YourFormName!]!SomeField") < 1 Then

HTH

siamandm
BronzeLounger
Posts: 1224
Joined: 01 May 2016, 09:58

Re: how to open form Add items when the item is not exists?

Post by siamandm »

thanks a lot @ burrina for the quick reply, i will give a try and see