Currently I have forms for customer adds, forms for customer views, and forms for customer edits.
Since my database has become large (probably due to this and the unecessary 3X forms), I am trying to get rid of the extra forms and when certani criteria is true, have the database decided if the user is trying to add,view, or edit.
Currnetly, my database is set up as a main form with the add/view/edit buttons that control the subform, that is a tab control which also has subforms within the tabs.
When a user clicks Add,View, or Edit.
The code sets the sourceobject of the subform to whatever add,view, edit forms I created.
Now, I just want it to be able to load a basic form, and then somehow based on some other condition, use the form will decide if it needs to Add, View, or Edit a Customer.
There is nothign ( I dont think ) I can do with the sourceobject code to tell it, that it needs to be read only.
So in that case I made a sperate text box on the main form, that when a user click on Add,View, Edit. It assigns that Text to the text box.
So I am thinking that based on text16 = Add somehow make the form a Add Form.
text16 = view run query to pull up form on ID readonly
text16 = edit run query to pull form on ID edit mode.
I am struggling with this and have run out of ideas.
Thanks in advance to ALL!