sdaigle2 / pdi-database

PDI's operations database build in MS access
0 stars 1 forks source link

Implement mergeCustomer(custID1, custID2) #12

Closed sdaigle2 closed 6 years ago

sdaigle2 commented 6 years ago
  1. in frmCustomers, create a new button that says Merge
  2. When you click the Merge button, an new modal form called frmMergeCustomers comes up
  3. frmMergeCustomers has two Combo Boxes and a button that says Merge
  4. Both combo boxes will display all Cust_Name entries from the customers table
  5. the first combo box will be pre-loaded with the Cust_Name selected in the frmCustomers form
  6. the users will enter the Cust_Name in the second combo box.
  7. When the user clicks Merge, the code will call mergeCustomer(custID1, custID2) and frmMergeCustomers will close.
smsu07 commented 6 years ago

Completed, Please test.

sdaigle2 commented 6 years ago

It works well. I would like to make one change to the functionality:

Current functionality

User clicks btnMerge in frmCustomers

Private Sub btnMerge_Click()
If (IsNull(txtCustID) Or txtCustID = "") Or (IsNull(txtCustName) Or txtCustName = "") Then
    MsgBox "Please select/Create a Customer First", vbInformation, "Select Customer"
    Exit Sub
End If
DoCmd.OpenForm "frmMergeCustomers", acNormal, , , , , txtCustID
End Sub

Desired functionality

User clicks btnMerge in frmJobs

Private Sub btnMerge_Click()
If (IsNull(txtCustID) Or txtCustID = "") Or (IsNull(txtCustName) Or txtCustName = "") Then
    'open frmMergCustomers with nothing in either combo box
End If
DoCmd.OpenForm "frmMergeCustomers", acNormal, , , , , txtCustID
End Sub
smsu07 commented 6 years ago

Changed Accordingly and Uploaded to GitHub.

sdaigle2 commented 6 years ago

Good: done.