Results 1 to 2 of 2
  1. #1
    Rich P is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    6

    VBA Code (spaces)

    My code is as follows;



    With rstEmployee
    !fzcl = (frozen_class)

    The fzcl has a space in the recordsource table (fz cl). I don't know how to use a space for it in the VBA code. It gives me the error Item not found in collection.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You shouldn't have spaces, but the work-around is to bracket the field name:

    [fz cl]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. two spaces to one without VB code ?
    By techexpressinc in forum Queries
    Replies: 4
    Last Post: 10-06-2010, 02:40 PM
  2. Trailing Spaces workaround
    By shexe in forum Queries
    Replies: 23
    Last Post: 09-21-2010, 04:28 AM
  3. Line Spaces in Sql View
    By Matthieu in forum Access
    Replies: 1
    Last Post: 04-06-2010, 10:24 AM
  4. Find Spaces in Field
    By stottle in forum Queries
    Replies: 6
    Last Post: 08-17-2009, 02:02 AM
  5. Deleting Spaces
    By grgerhard in forum Import/Export Data
    Replies: 2
    Last Post: 04-30-2006, 06:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums