D
Dimitris Nikolakakis
I have a table Orders (OrderID, Date, ... ... ...)
I have a form FOrderInsert and I have a TextBox and the user gives an
OrderID.
I have put a button on the form that inserts a record in Orders table with
the value of TextBox and Date=Now().
My problem is if the record exists (TextBox exists in Orders.OrderID).
My thought is to write code......
IF Me.TEXTBOX EXISTS IN ORDERS TABLE THEN
MSGBOX
Me.ActiveControl.Undo
ELSE
INSERT RECORD IN ORDERS
but I do not know the exact way.
thanks
I have a form FOrderInsert and I have a TextBox and the user gives an
OrderID.
I have put a button on the form that inserts a record in Orders table with
the value of TextBox and Date=Now().
My problem is if the record exists (TextBox exists in Orders.OrderID).
My thought is to write code......
IF Me.TEXTBOX EXISTS IN ORDERS TABLE THEN
MSGBOX
Me.ActiveControl.Undo
ELSE
INSERT RECORD IN ORDERS
but I do not know the exact way.
thanks