Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Problem with "Not In List" event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
scubadiver - 10 May 2007 10:31 GMT
The table source for the combo box doesn't have anything in it and I have
code in the "not in list" event to add to the list. When I try to add
something to the list I get the following error:

A problem occurred while Microsoft Access was communication with the OLE
server or ActiveX Control.

I have another subform with a variation of the code and it works fine.

Cheers
Daniel - 10 May 2007 13:21 GMT
Sounds weird.

1- have you compiled your code recently? you should.
2- have you compacted the db recently? you should.
3- Post your code so we can take a look at it in detail.
Signature

Hope this helps,

Daniel P

> The table source for the combo box doesn't have anything in it and I have
> code in the "not in list" event to add to the list. When I try to add
[quoted text clipped - 6 lines]
>
> Cheers
scubadiver - 10 May 2007 14:52 GMT
Dim strSql As String
   Dim I As Integer
   Dim Msg As String

   'Exit this sub if the combo box is cleared
   If NewData = "" Then Exit Sub

   Msg = "'" & NewData & "' is not currently in the product list." & vbCr &
vbCr
   Msg = Msg & "Do you want to add it?"

   I = MsgBox(Msg, vbQuestion + vbYesNo, "Unknown Product type...")
   If I = vbYes Then
       strSql = "Insert Into lkup_JS ([JSat]) " & _
                "values ('" & NewData & "');"
       CurrentDb.Execute strSql, dbFailOnError
       Response = acDataErrAdded
   Else
       Response = acDataErrContinue
   End If

> Sounds weird.
>
[quoted text clipped - 12 lines]
> >
> > Cheers
scubadiver - 14 May 2007 10:12 GMT
I have compacted and compiled but I still get the same problem

> Sounds weird.
>
[quoted text clipped - 12 lines]
> >
> > Cheers
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.