In my database, the "add" and "edit" switchboard buttons open the same form.
Clicking on "Add" opens frmCustomerData in add mode, clicking on "Edit" opens frmCustomerData in edit mode.
When opened in edit mode I would like the user to be able to select a customer record (for editing) from a combo box named cboCustomerName. However, when the form is opened in add mode, the combo box should not be available (not visible).
If I add the following line into the code behind the "Edit" switchboard button will that do the trick?
frmCustomerData.cboCustomerName.Visible = True
And for the "Add" button:
frmCustomerData.cboCustomerName.Visible = False
Or is there more to it than that?
Clicking on "Add" opens frmCustomerData in add mode, clicking on "Edit" opens frmCustomerData in edit mode.
When opened in edit mode I would like the user to be able to select a customer record (for editing) from a combo box named cboCustomerName. However, when the form is opened in add mode, the combo box should not be available (not visible).
If I add the following line into the code behind the "Edit" switchboard button will that do the trick?
frmCustomerData.cboCustomerName.Visible = True
And for the "Add" button:
frmCustomerData.cboCustomerName.Visible = False
Or is there more to it than that?