G
Glenn Brown
I have a problem with the following code. When I run the data and application
databases on my local PC, everything works fine. Then I put the data file on
a network share the code breaks (doesn't work)?
This is how the code works;
1. While in form A, the user double clicks on the company field to create a
new company.
2. A form opens (frmCompaniesNew), the user adds info and then clicks the ok
button. This company should be added into the company field on form A. This
is the part that doesn't work?
Why...could someone please help?
CODE FOR FORM A
Private Sub txtCompanyID_DblClick(Cancel As Integer)
On Error GoTo Err_txtCompanyID_DblClick
DoCmd.OpenForm "frmCompaniesNew", , , , , acDialog, "GotoNew"
Me.txtCompanyID.Requery
Me.txtCompanyID = Forms!frmCompaniesNew.txtCompanyID
DoCmd.Close acForm, "frmCompaniesNew"
Exit_txtCompanyID_DblClick:
Exit Sub
Err_txtCompanyID_DblClick:
Resume Exit_txtCompanyID_DblClick
End Sub
CODE FOR OK BUTTON IN "frmCompaniesNew" FORM
Private Sub cmdOk_Click()
On Error GoTo Err_cmdOk_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Visible = False
Exit_cmdOk_Click:
Exit Sub
Err_cmdOk_Click:
Resume Exit_cmdOk_Click
End Sub
databases on my local PC, everything works fine. Then I put the data file on
a network share the code breaks (doesn't work)?
This is how the code works;
1. While in form A, the user double clicks on the company field to create a
new company.
2. A form opens (frmCompaniesNew), the user adds info and then clicks the ok
button. This company should be added into the company field on form A. This
is the part that doesn't work?
Why...could someone please help?
CODE FOR FORM A
Private Sub txtCompanyID_DblClick(Cancel As Integer)
On Error GoTo Err_txtCompanyID_DblClick
DoCmd.OpenForm "frmCompaniesNew", , , , , acDialog, "GotoNew"
Me.txtCompanyID.Requery
Me.txtCompanyID = Forms!frmCompaniesNew.txtCompanyID
DoCmd.Close acForm, "frmCompaniesNew"
Exit_txtCompanyID_DblClick:
Exit Sub
Err_txtCompanyID_DblClick:
Resume Exit_txtCompanyID_DblClick
End Sub
CODE FOR OK BUTTON IN "frmCompaniesNew" FORM
Private Sub cmdOk_Click()
On Error GoTo Err_cmdOk_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Visible = False
Exit_cmdOk_Click:
Exit Sub
Err_cmdOk_Click:
Resume Exit_cmdOk_Click
End Sub