Not in list combo ADO Unbound

hooks

Registered User.
Local time
Yesterday, 19:56
Joined
Aug 13, 2004
Messages
160
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
 
hooks,

You only do the:

Response = acDataErrContinue

when the user doesn't want to add. Need it on both sides of IF - THEN.

Wayne
 
Thanks Man
 

Users who are viewing this thread

Back
Top Bottom