I have a sales order form. If it is a new order, then some fields are combo boxes and others are text boxes.
If it is an existing order, it is the reverse, and displays an order already in the database.
What is the recommended method for handling this? Is it better to have a separate form open for entering new order information, and upon saving, it opens the form for existing orders and displays the info that was entered plus allows entering other details.
This is how I had it, but changes to one form always had to be made on the other form. I am starting fresh, and have an option box for New or Existing. I suppose I could display/hide different fields depending on the status, but I get easily confused.
Are there any experienced developers with opinions on this? I am not one to sit and write hundreds of lines of code. I want it clean and simple.
This is why I avoid all the "if a user enters a record, and it doesn't exist, go through a gazillion lines of code to check and add the record, then display all the other fields for data entry rather than the fields from the table, and then save all the data entry to the table, etc etc" I always seem to have to look up every little thing I want it to do. I try it one way, and it works but the next time I try the same thing where it makes sense to use that code, it doesn't work.
thanks.
If it is an existing order, it is the reverse, and displays an order already in the database.
What is the recommended method for handling this? Is it better to have a separate form open for entering new order information, and upon saving, it opens the form for existing orders and displays the info that was entered plus allows entering other details.
This is how I had it, but changes to one form always had to be made on the other form. I am starting fresh, and have an option box for New or Existing. I suppose I could display/hide different fields depending on the status, but I get easily confused.
Are there any experienced developers with opinions on this? I am not one to sit and write hundreds of lines of code. I want it clean and simple.
This is why I avoid all the "if a user enters a record, and it doesn't exist, go through a gazillion lines of code to check and add the record, then display all the other fields for data entry rather than the fields from the table, and then save all the data entry to the table, etc etc" I always seem to have to look up every little thing I want it to do. I try it one way, and it works but the next time I try the same thing where it makes sense to use that code, it doesn't work.
thanks.