Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF condition in table or UI? 1

Status
Not open for further replies.

stillwillyboy

Technical User
Jan 22, 2004
165
US

In my jobs table, I have fields for Cust#, Job#, Step#, (which is just an ID number for data entry), StepCode (which is a two letter code determining how the step is paid), Units and some other info

I am wanting it so that the user MUST enter some number of Units if the StepCode is PR and CANNOT enter Units if the StepCode is anything else.

Does this IF…Then statement go into the table property for the Units or does it go in the UI as a constraint?

TIA,

Bill
 
Frankly I would put it in both places. First it must be on the table in case data ever gets entered from other than the UI (trust me in a production system this will happen sometime because someone needs a lot of records entered from another system or all sorts of reasons.

But it is best to avoid sending known bad information to be entered, so the UI should do a check and let the person fix the dat before tying up network and databases resources sending data that will be rejected. It is also faster for the user if the error if pointed out immediately rather than having to wait until the data is sent and rejected and an error messge returned.

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top