J
JulieD
Hi
I have form with a combo box called CompanyID - which the user can select
from or, if the item isn't in the list, i have code that opens the Company's
form (double click event) and they can add the company. I then close the
form and would like to see the new company in the combo boxes list.
i am using Me.CompanyID.Requery
but it doesn't seem to work all the time, if they go to add the company
again and then close the form (without doing anything) the company will be
there in the list.
Code is
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(Me.CompanyID) Then Me.CompanyID = 0
stDocName = "FRM_Company"
stLinkCriteria = "[CompanyID] = " & Me.[CompanyID]
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit
Me.CompanyID.Requery
Any assistance would be gratefully received. PS i'm using Access 97
Cheers
JulieD
I have form with a combo box called CompanyID - which the user can select
from or, if the item isn't in the list, i have code that opens the Company's
form (double click event) and they can add the company. I then close the
form and would like to see the new company in the combo boxes list.
i am using Me.CompanyID.Requery
but it doesn't seem to work all the time, if they go to add the company
again and then close the form (without doing anything) the company will be
there in the list.
Code is
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(Me.CompanyID) Then Me.CompanyID = 0
stDocName = "FRM_Company"
stLinkCriteria = "[CompanyID] = " & Me.[CompanyID]
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit
Me.CompanyID.Requery
Any assistance would be gratefully received. PS i'm using Access 97
Cheers
JulieD