Zippersabrat
Blah Blah Blah :o)
- Local time
- Today, 10:22
- Joined
- May 5, 2010
- Messages
- 31
I am creating a database to centralize the supply orders for an animal hospital. Currently I am working on the order list itself. Employees will be able to add items to the order list (the Item Name field is controlled via a separate Items table). Once an item is put on a purchase order the item is deleted off the order list. I have set the Item Name as a non-duplicating Index to prevent people from adding repeat items. However, I do not like the message given...many of the people at the hospital are scared of computers and I want more user friendly messages. I came up with the following code; however, it is flagging everything as being on the order list...can someone help, please!
Thanks a bunch!
Private Sub Item_Name_BeforeUpdate(Cancel As Integer)
Dim Variable As Integer
If Me![Item Name] = [Forms]![OrderList].[Item Name] Then
Variable = MsgBox("This item is already on the order list!", vbExclamation + vbOKOnly, "Oops")
Me.Undo
Else
End If
End Sub
Thanks a bunch!
Private Sub Item_Name_BeforeUpdate(Cancel As Integer)
Dim Variable As Integer
If Me![Item Name] = [Forms]![OrderList].[Item Name] Then
Variable = MsgBox("This item is already on the order list!", vbExclamation + vbOKOnly, "Oops")
Me.Undo
Else
End If
End Sub