data is entered from the field using a handheld device like a PDA.
PLease see thread here
http://www.thescripts.com/forum/thread190072.html
I have now this code in NotInList property of my COmbo box, but it produces an error message
"An error occurred. Please try again." when you enter new data
++++++++++++++
Expand|Select|Wrap|Line Numbers
- Private Sub Combo84_AfterUpdate()
- ' Find the record that matches the control.
- Dim rs As Object
- Set rs = Me.Recordset.Clone
- rs.FindFirst "[RecordNum] = " & Str(Nz(Me![Combo84], 0))
- If Not rs.EOF Then Me.Bookmark = rs.Bookmark
- End Sub
- Private Sub Combo84_NotInList(NewData As String, Response As Integer)
- Dim Db As Database, rs As Recordset
- Dim strmsg As String
- strmsg = "'" & NewData & "' is not in Current List"
- strmsg = strmsg & "@You Must Add it to Continue"
- strmsg = strmsg & "@Click Yes to link or No to Cancel."
- If MsgBox(strmsg, vbQuestion + vbYesNo, "Add new Description?") = vbNo Then
- Response = acDataErrContinue
- Else
- Set Db = CurrentDb
- Set rs = Db.OpenRecordset("Miracle_Cloth_Main", dbOpenDynaset)
- On Error Resume Next
- rs.AddNew
- rs!YourField = NewData
- rs.Update
- rs.Close
- Set rs = Nothing
- If Err Then
- MsgBox "An error occurred. Please try again."
- Response = acDataErrContinue
- Else
- Response = acDataErrAdded
- End If
- End If
- End Sub
occuring when entering data
Any help will be much appreciated