F
Faraz Ahmed Qureshi
ACCESS2007
The code was working well:
Private Sub Login_id_NotInList(NewData As String, Response As Integer)
On Error GoTo NtInList_Err
Dim intAnswer As Integer
intAnswer = MsgBox("The login ID " & Chr(34) & NewData & _
Chr(34) & " is not currently listed." & vbCrLf & _
"Would you like to add it to the list now?" _
, vbYesNo, "BC")
If intAnswer = vbYes Then
DoCmd.OpenForm "User", , , , acFormAdd, acDialog
Form_User.Login_id = NewData
Response = acDataErrAdded
Else
MsgBox "Please choose a name from the list." _
, vbInformation, "BC"
Response = acDataErrContinue
End If
NtInList_Exit:
Exit Sub
NtInList_Err:
MsgBox Err.Description, vbCritical, "Error"
Resume NtInList_Exit
End Sub
But now the FORM "USER" doesn't appear and the database seems to be hanged.
However, upon Tab, the field names seem to be appearing on the bottom bar?
The code was working well:
Private Sub Login_id_NotInList(NewData As String, Response As Integer)
On Error GoTo NtInList_Err
Dim intAnswer As Integer
intAnswer = MsgBox("The login ID " & Chr(34) & NewData & _
Chr(34) & " is not currently listed." & vbCrLf & _
"Would you like to add it to the list now?" _
, vbYesNo, "BC")
If intAnswer = vbYes Then
DoCmd.OpenForm "User", , , , acFormAdd, acDialog
Form_User.Login_id = NewData
Response = acDataErrAdded
Else
MsgBox "Please choose a name from the list." _
, vbInformation, "BC"
Response = acDataErrContinue
End If
NtInList_Exit:
Exit Sub
NtInList_Err:
MsgBox Err.Description, vbCritical, "Error"
Resume NtInList_Exit
End Sub
But now the FORM "USER" doesn't appear and the database seems to be hanged.
However, upon Tab, the field names seem to be appearing on the bottom bar?