I am using the following code which i got from the faq page to add data to my users table. The value is added but I still get the default access not in list message.
If MsgBox(Message1 & NL & Message2, vbQuestion + vbYesNo, Title) = vbYes Then
Response = acDataErrAdded
DoCmd.SetWarnings False
Set cbors = New ADODB.Recordset
cbors.Open ("SELECT UserID, UserName FROM tUsers ORDER BY UserName"), cn, adOpenDynamic, adLockOptimistic
cbors.AddNew
cbors.Fields("UserName") = NewData
'cbors![UserName] = Me.cboUsers.Column(0)
cbors.Update
cbors.Close
DoCmd.SetWarnings True
Else
Response = acDataErrContinue
Me.cboUsers = ""
End If
Thanks
If MsgBox(Message1 & NL & Message2, vbQuestion + vbYesNo, Title) = vbYes Then
Response = acDataErrAdded
DoCmd.SetWarnings False
Set cbors = New ADODB.Recordset
cbors.Open ("SELECT UserID, UserName FROM tUsers ORDER BY UserName"), cn, adOpenDynamic, adLockOptimistic
cbors.AddNew
cbors.Fields("UserName") = NewData
'cbors![UserName] = Me.cboUsers.Column(0)
cbors.Update
cbors.Close
DoCmd.SetWarnings True
Else
Response = acDataErrContinue
Me.cboUsers = ""
End If
Thanks