J
John W
I'm attempting to write a SQL statement in VBA to select specific records
from a table but I'm not having much luck. What I need to do is select all
records from Table 2 where Field 1 is equal to Field 1 in Table 1. I've
defined a variable ("cl_ID") that I can set equal to Field 1 in Table 1. I
guess I just need a basic example of what to do. I've looked online but all
the examples are for more complicated situations.
I'm trying something like
dim mySQL as string
mySQL = "SELECT * FROM Table2"
"WHERE Field1 = cl_ID"
docmd.runSQL mySQL
Thanks for the help...I know this is a pretty easy question!
from a table but I'm not having much luck. What I need to do is select all
records from Table 2 where Field 1 is equal to Field 1 in Table 1. I've
defined a variable ("cl_ID") that I can set equal to Field 1 in Table 1. I
guess I just need a basic example of what to do. I've looked online but all
the examples are for more complicated situations.
I'm trying something like
dim mySQL as string
mySQL = "SELECT * FROM Table2"
"WHERE Field1 = cl_ID"
docmd.runSQL mySQL
Thanks for the help...I know this is a pretty easy question!