how to access a table through VBA ina openned database

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

Guest

hello ,
At present I'm handling a project which is to be developed only
through MS Access 2000. I'm a regular user of VB 6 and SQL Server 7. I'm
facing problems to program certain concepts.
1. to update a table (say table 1) in an openned database frm another table
(say table 2) in another database(which need not be openned). the checking is
done on the date field tof the tables.
2. if i access table 2 through ADO, then how can i access the table 1 in the
openend database to update it's values.
I have to submit the project very soon . I'm stuck with these.
please help me. I'll be very much oblidged to you for your help.
 
1. to update a table (say table 1) in an openned database frm another
table (say table 2) in another database(which need not be openned).
the checking is done on the date field tof the tables.

INSERT INTO Table1 (First, Second, Third)
SELECT Ay, Bee, Sea
FROM Table2 IN [";database=d:\myData\other.mdb"]
WHERE ToBeCopied = TRUE

I can never remember the syntax for the [] stuff in the IN clause, so check
in help. I don't _think_ it's a DAO-only syntax!
2. if i access table 2 through ADO, then how can i access the table 1
in the openend database to update it's values.

I'm not a ADO guru (that's why this group is DAO/ VBA!) but I think you
can point a Connection object at any data source you have permissions to,
can't you?

HTH


Tim F
 
Back
Top