Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Delta, Br. Columbia
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    On NotinList (Access 2000)

    I have a NotinList event that works fine except for one thing. If the Size is not in the list, I have to add it to the Plant_Size_Master which is the table underlying the combo box and I have to add a new record to another table tblPlantSize_Inventory that is linked via a query to the main underlying table of the sub form on which the combo box is placed. Although all the code is correct as far as I can see I am continually getting an error telling me that the "Item is not found in this collection" when it tries to add the new Inventory record. The error occurs on the !IN_Cut# line. IN_Cut# is the correct field name for this table. The record is successfully added to the Size Master table. I presume that my Openrecordset is not working but I do not know. Below is the full code of the event procedure:

    Private Sub PL_Cut_Size_NotInList(NewData As String, Response As Integer)

    Dim dbsRoses As DAO.Database
    Dim rstSizes As DAO.Recordset
    Dim rstInventory As DAO.Recordset


    If MsgBox("Size is not in list. Note that only LINERS, PLUGS and LONG are selected. Do you wish to add this one?", _
    vbOKCancel) = vbOK Then

  2. #2
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On NotinList (Access 2000)

    Access doesn't like odd charaters in field names. Just put brackets around it:

    ![IN_Cut#] = Forms![frmEnter_Cut#].[WCut#]

  3. #3
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Delta, Br. Columbia
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: On NotinList (Access 2000)

    Thanks that worked fine. Will change all these field names when I have time to avoid special characters

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •