Issue with Clients use of Add/Edit form (1 Viewer)

mkdrep

Registered User.
Local time
Today, 11:10
Joined
Feb 6, 2014
Messages
176
My issue has only developed as a result of a new person using my existing database program. My other employees understand how the Add/Edit function works, but this person did not; even after having explained the process. I can't seem to find a way to resolve the issue on my own, hence this new thread.

The attached (form_Main_Project.jpg) is the main record form whose information can't be edited. (NOTE: The JT ID# in the top right corner (in this case 78021) is the Primary Key#). In order to allow employees to either edit the existing information or ADD a new record, the employee clicks on the "Add/Edit Job" button in right corner of this form, which causes the (form_Add-edit-1.jpg) to open. At this point, the employee can edit anything in the record with the exception of the JT ID#.

If the employee doesn't want to edit the existing record but only wants to ADD a NEW record, they simply click on the "Add New Job" button and a new record appears, as shown in (form_Add_record.jpg). Once any information is added into the Job Name field, a new JT ID# is automatically added. Employee can add info into the balance of the fields and then close the form to save the new record.

In a perfect world, I would just want my employee to have two separate buttons on the (form_Main_project) one to "Add New Record"
from the (form_Main_project) which would only allow the addition of a new record. I've tried to do that, and once I click on Add New Record it opens up a blank (form_Main_Project) but I can't edit the form because I have locked down all the fields.

I hope this isn't too confusing, but I'm not sure where to go from here. Any help would be greatly appreciated.

Mark
 

Attachments

  • form_Add_record.jpg
    form_Add_record.jpg
    63.1 KB · Views: 104
  • form_Add-Edit-1.jpg
    form_Add-Edit-1.jpg
    75.5 KB · Views: 94
  • form_Main_Project.jpg
    form_Main_Project.jpg
    62.7 KB · Views: 96

theDBguy

I’m here to help
Staff member
Local time
Today, 08:10
Joined
Oct 29, 2018
Messages
21,447
Hi Mark. Not sure what the problem is. When the edit form opens, you said the user can click on another button to add new records. What is in the code for that button, and why can't you apply it to the first form, so you can have your add button separate from the edit button?
 

plog

Banishment Pending
Local time
Today, 10:10
Joined
May 11, 2011
Messages
11,635
I don't even know why form_Add_record even exists. Its the exact same form as form_Add-Edit. You should be able to have 2 buttons, one to open it to a specific record and one to open it in Add mode.
 

mkdrep

Registered User.
Local time
Today, 11:10
Joined
Feb 6, 2014
Messages
176
I don't even know why form_Add_record even exists. Its the exact same form as form_Add-Edit. You should be able to have 2 buttons, one to open it to a specific record and one to open it in Add mode.
I by no means am a master programmer. I've adapted my original program over the years as issues have developed. The first issue I had years ago was when employees would start to change information on the main form page. That's when I added the Add/Edit button which opens to the specific record, but in an edit mode. If I put an ADD button on the main form, it opens a new form, but it can't be edited.

Thank you for your reply. I'll just find another solution
 

Micron

AWF VIP
Local time
Today, 11:10
Joined
Oct 20, 2018
Messages
3,478
I've tried to do that, and once I click on Add New Record it opens up a blank (form_Main_Project) but I can't edit the form because I have locked down all the fields.
That would be the way, apart from perhaps giving a user the option to go direct to either add or editing records rather than opening that first form.

If you had 2 buttons you'd open the form in either add or edit mode. You might pass that mode value to the opening form via open args, in which case your code has 2 blocks: 1 for add, 1 for edit and you disable - or not - the controls accordingly in each.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:10
Joined
May 7, 2009
Messages
19,227
you can easily solve your problem by Copying the frm_main_projectect (copy/paste from navigation pane) and renaming the second copy as
add_form. remove the code from this form that disables the controls.
then you just create Two distinct forms (you can see it in VBE project property window).

using "same" form, only instantiate another copy of that form. if two same forms are open, then navigating to the other might
make the other form out of sync.
 

Micron

AWF VIP
Local time
Today, 11:10
Joined
Oct 20, 2018
Messages
3,478
I don't believe in recreating the same form or report. To each their own, I guess. Dare say I'm not alone in that sentiment.
 

Users who are viewing this thread

Top Bottom