G
GR
Hi,
I am using the not in list event to add a new item to a
combo box. but the IsLoaded is giving me lot of problems..
is there any other way to know if a form is loaded or not?
here is the code:
Private Sub ProjectName_NotInList(NewData As String,
Response As Integer)
Dim obj as Object
If MsgBox("Sub-Project not found, add?", vbYesNo +
vbQuestion, _
"Please Respond") = vbYes Then
DoCmd.OpenForm "frmSubProjects", _
DataMode:=acFormAdd, _
WindowMode:=acDialog, _
OpenArgs:=NewData
Set obj = Forms!frmSubProjects
'here is the problem
If obj.IsLoaded = True Then
Response = acDataErrAdded
DoCmd.Close acForm, "frmSubProjects",
acSaveYes
Else
Response = acDataErrContinue
End If
Else
Response = acDataErrContinue
End If
End Sub
thx,
gr
I am using the not in list event to add a new item to a
combo box. but the IsLoaded is giving me lot of problems..
is there any other way to know if a form is loaded or not?
here is the code:
Private Sub ProjectName_NotInList(NewData As String,
Response As Integer)
Dim obj as Object
If MsgBox("Sub-Project not found, add?", vbYesNo +
vbQuestion, _
"Please Respond") = vbYes Then
DoCmd.OpenForm "frmSubProjects", _
DataMode:=acFormAdd, _
WindowMode:=acDialog, _
OpenArgs:=NewData
Set obj = Forms!frmSubProjects
'here is the problem
If obj.IsLoaded = True Then
Response = acDataErrAdded
DoCmd.Close acForm, "frmSubProjects",
acSaveYes
Else
Response = acDataErrContinue
End If
Else
Response = acDataErrContinue
End If
End Sub
thx,
gr