Table Has Name With Space

verno_25_02
10-16-2004, 08:43 PM
Hello Everyone,

I have been searching around trying to find a solution for this problem. I know I encountered it before but for the life of me I cannot find the solution. I have been out of this for awhile now.

Here is what I have:
An Access database named Plate
Inside of this database I have 3 tables called A36, ABR, Floor Plate.

Now on my form I have a combo that is populated with A36, ABR, and Floor Plate. Based on what the user chooses I want to lookup certain information in that table.

I am having problems connecting with the table Floor Plate (because it has a space in the name). What am I missing in my code below to solve this problem. I know I need some sort of brackets or something around Combo3.



Dim sTakeOffCat2 As String
sTakeOffCat2 = "SELECT RefID,PartDescription,Material,UM,PartSize,CostUM,WeightUM "
sTakeOffCat2 = sTakeOffCat2 & "FROM " & Combo3.Text & " "
sTakeOffCat2 = sTakeOffCat2 & "ORDER BY RefID"


Thankyou in advance for your help.

webbone
10-16-2004, 08:45 PM
Enclose the name of the Table thusly:

SELECT * FROM [Floor Plate]

verno_25_02
10-16-2004, 09:01 PM
Thank you webbone for your quick response, works great.

Thanks again.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum