VB Change Type

G

GoFlyersCS

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
 
K

Ken Snell [MVP]

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.
 
G

GoFlyersCS

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top