VBA / SQL field names with spaces

Posted on 2004-11-24
Last Modified: 2013-12-03
i use the following code in VBA / SQL inorder to pull out all fields with ids required.

FOHF_table.fld_tier_level IN (" & IDs_required & ")

i wish to do the same for a another field however when in the above example i can say  IDs_required= 1

However now i wish to say Filed_required = abc ZYX

Vba does not like the space between the abc and  xyz.  ( in the SQL i can simply put 'abc xyz')  do i have to rename the things in the database? abc_xyz.?
Question by:rwowens
    1 Comment
    LVL 9

    Accepted Solution

    test to say Filed_required = [abc ZYX]

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (, we saw how to put the Delete button back there where it belongs.  "Delete" is …
    A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now