I have a form that is used to add a new account. The menu form has a "add new acct" button that I have the following code:
Private Sub btn_Add_New_Acct_Click()
On Error GoTo btn_Add_New_Acctt_Click_Err
DoCmd.OpenForm "frm_Organizations_and_Accounts", acNormal, "", "", acAdd, acNormal
DoCmd.Maximize
btn_Add_New_Acct_Click_Exit:
Exit Sub
The form is used to add new acct and also is used to edit existing accts. The first time I open the form using the add new, it the fields are blank. Once I view an existing acct, the next time I click on add new acct, the fields are prefilled with the last one I viewed.
The code I use to open he form is:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Form_Open_Err
DoCmd.Requery ""
DoCmd.OpenForm "frm_Organizations_and_Accounts", acNormal, "", _
"[tbl_Orgs]![OrgName]=[Forms]![frm_New_Menu]![comb
rgs_and_Accounts]", , acNormal
DoCmd.Maximize
Form_Open_Exit:
Exit Sub
Is there some sort of function to clear out the fields when I want to add?
Appreciate your help!
Private Sub btn_Add_New_Acct_Click()
On Error GoTo btn_Add_New_Acctt_Click_Err
DoCmd.OpenForm "frm_Organizations_and_Accounts", acNormal, "", "", acAdd, acNormal
DoCmd.Maximize
btn_Add_New_Acct_Click_Exit:
Exit Sub
The form is used to add new acct and also is used to edit existing accts. The first time I open the form using the add new, it the fields are blank. Once I view an existing acct, the next time I click on add new acct, the fields are prefilled with the last one I viewed.
The code I use to open he form is:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Form_Open_Err
DoCmd.Requery ""
DoCmd.OpenForm "frm_Organizations_and_Accounts", acNormal, "", _
"[tbl_Orgs]![OrgName]=[Forms]![frm_New_Menu]![comb
DoCmd.Maximize
Form_Open_Exit:
Exit Sub
Is there some sort of function to clear out the fields when I want to add?
Appreciate your help!