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!

OnNotInList Event Combo Box

Status
Not open for further replies.

jgncoh

Technical User
Jan 21, 2005
2
0
0
US
I am trying to edit a database that I did not create. The original creator did not follow good naming convention and left spaces in the names of the tables
(ex., Lookup: Resources instead of tblResources).

This is causing me grief when I am trying to add VB for the OnNotInList Event for a combo box. I am trying to write a SQL statement to update the table if the user chooses to add a name not available in the combo box with the following statement:

"INSERT INTO Lookup: Resources ([Resource Name])

I do not think it likes the spaces in the table name. Any ideas. Thanks in advance.
 
Try with [brackets] around spaces and special characters:

[tt]"INSERT INTO [Lookup: Resources] ([Resource Name]) values ('" & _
me!txtControlVithResourceName.value & "'") [/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top