G
Guest
Hi
I have been given a code to modify. It picks data from Access database by selcting different checkboxes in Excel. I have encountered this SQL Query in tha
"SELECT DISTINCT " + CStr(field) + "" & Chr(13) & "" & Chr(10) & "FROM `" + CStr(datab) + "`." + CStr(table_name) + " " + CStr(table_name) + "
Now I am confused why all these Chr() have been used.I read in VB help that Chr(13) and CHr(10) convert to linefeed/carriage return in Windows, so why are they being used
Secondly why is table_name is twice in the quer
Wouldn't this Query be fine
"SELECT DISTINCT " + CStr(field) + "FROM `" + CStr(datab) + "`." + CStr(table_name)
Here datab is the databse name, field is in the form table name.field name . I guess this makes even Cstr(table_name) redundant, not too sure though
Please help
thnks
I have been given a code to modify. It picks data from Access database by selcting different checkboxes in Excel. I have encountered this SQL Query in tha
"SELECT DISTINCT " + CStr(field) + "" & Chr(13) & "" & Chr(10) & "FROM `" + CStr(datab) + "`." + CStr(table_name) + " " + CStr(table_name) + "
Now I am confused why all these Chr() have been used.I read in VB help that Chr(13) and CHr(10) convert to linefeed/carriage return in Windows, so why are they being used
Secondly why is table_name is twice in the quer
Wouldn't this Query be fine
"SELECT DISTINCT " + CStr(field) + "FROM `" + CStr(datab) + "`." + CStr(table_name)
Here datab is the databse name, field is in the form table name.field name . I guess this makes even Cstr(table_name) redundant, not too sure though
Please help
thnks