Hello everybody...
I have form based on table (Borrow) with following column name:
Borrowid PK (autonumber), Bookid, Satuts
My questions is that, for "Bookid" with "Satuts", I would like to prevent duplicates when entering in the form.
I can't make all the fields primary key because "Bookid" and "Status" can be duplicated.
I tried this code in macro builder but it didn't work with me and i got this message:the object does not contain the automation object ms access
Anybody can help me?
there are attachment
I have form based on table (Borrow) with following column name:
Borrowid PK (autonumber), Bookid, Satuts
My questions is that, for "Bookid" with "Satuts", I would like to prevent duplicates when entering in the form.
I can't make all the fields primary key because "Bookid" and "Status" can be duplicated.
I tried this code in macro builder but it didn't work with me and i got this message:the object does not contain the automation object ms access
Code:
If(DCount([BookId],[Borrow],[BookId]=[Combo175] And [Status]="Borrowed")>0 Then
MsgBox "this book has been borrowed"
Me.Undo
Anybody can help me?
there are attachment