Unanswered: Check to see if a record has already been entered.
I'm hoping someone can help me. I have a system which creates an estimate, and the later converts the estimate to an order. My problem is that the system doesn't know to only do this one time (and users will not know whether or not an order has already been created), so I'll get duplicate orders.
I want to write something in the code to the effect of...
Go look at the orders table and see if there is one with this Estimate ID...if there is, send a message, if not, convert the estimate...
I can handle the IF/THEN part, but...I can't figure out the code for the first half (see if there is one already there).
what about building a 1:1 relationship between both tables (Estimate table as master) and use referential integrity to ensure that there is definitely only 0 or 1 order per estimate.
build a "wrapperquery" for your estimate table (all fields from estimate and at least the orderID from the order table .. use a right join) then base your form on the query instead of the table. you can now check the orderID field directly to display the order button or not.