Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use a field with spaces in a recordset 1

Status
Not open for further replies.

emik

MIS
Jul 24, 2006
80
0
0
CA
Hi,

I currently have a process to import an Excel file using the Transferspreadsheet method. The Excel file has fields with spaces, so the field names in my Access table must match (thus having spaces).

In the code for a field without spaces, the recordset is

test = currentdb.openrecordset("Select field FROM..etc.")

To reference it I use test!field

Now how could I do that for a field with spaces?

Thanks.
 

Use brackets, eg test![field with space]

TomCologne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top