VB Change Type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

SELECT DISTINCT COUNT(table.SESSION_ID) as session FROM table1, table2 WHERE
table1.USER_ID = table2.USER_ID AND....etc.

The USER_ID column in table1 is set to "Text" and the USER_ID in table2 is
set to "Number". Is there a way to temporarily change the field in table1 to
"Number" using VB? The tables being referred to are linked tables.

Thanks
 
Assuming that USER_ID in table2 is a long integer:

SELECT DISTINCT COUNT(table.SESSION_ID) as session FROM table1, table2 WHERE
CLng(table1.USER_ID) = table2.USER_ID AND....etc.
 
Worked great. Thanks Ken.

Ken Snell said:
Assuming that USER_ID in table2 is a long integer:

SELECT DISTINCT COUNT(table.SESSION_ID) as session FROM table1, table2 WHERE
CLng(table1.USER_ID) = table2.USER_ID AND....etc.
 
Back
Top