If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Multi-select Error-allenbrowne
I used the code from http://allenbrowne.com and seem to have problem with the
line. it worked fine when the table has an auto number column but i removed that column the table has just one NAME col also it stopped displaying the names. When i click the command button it displays all the data wheni select a name it says syntax error and goes to thsi line!! can you help strWhere = "[NAME] IN (" & Left$(strWhere, lngLen) & ")" |
#2
|
|||
|
|||
Multi-select Error-allenbrowne
Hello Deron.
"Deron" wrote: I used the code from http://allenbrowne.com and seem to have problem with the line. it worked fine when the table has an auto number column but i removed that column the table has just one NAME col also it stopped displaying the names. When i click the command button it displays all the data when i select a name it says syntax error and goes to thsi line!! can you help strWhere = "[NAME] IN (" & Left$(strWhere, lngLen) & ")" I guess that the problem is that you earlier used a number field and now the field is of type text. I therefore suggest to use this line: strWhere = BuildCriteria("[NAME]", dbText, "IN (" & Left$(strWhere, _ lngLen) & ")") If it happens that the list separator should not be a comma but for example a semicolon, you should isert a line before that rplaces all commas by a semicolon, like this: strWhere = Replace(strWhere, ",", ";") -- Regards, Wolfgang |
Thread Tools | |
Display Modes | |
|
|