Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

ADO need help with this assignment? Help.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RON - 01 Nov 2006 02:23 GMT
OK I need your help, I need to do this assignment for a class and am getting
nowhere with it.

I need to use ADO to display information on a form from the current database
and another database.

I need to make a Form with Student info that will be filled into text boxes
from the STUDENT table of the current database.  For example txtname,
txtaddress, txtzip  would all get filled in from the STUDENTS Table.

On this same form I need a couple textboxes for example
txtcontactPersonName, txtContactPersonPhone   <-- these will be filled in
using ADO from another databases CONTACTS Table.  In the Contacts table of
the other Database, it has a corresponding StudentID to a corresponding
StudentID in the STUDENTS table of this database.

So for example If I wanted to make a NEXT RECORD BUTTON to show me all of
these values in a table, how would I code using ADO for this?

thanks for any help
Alex Dybenko - 01 Nov 2006 10:18 GMT
You can join tables from different databases using IN like:

Select * from MyTable IN'C:\myother.mdb'

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

> OK I need your help, I need to do this assignment for a class and am
> getting
[quoted text clipped - 19 lines]
>
> thanks for any help
onedaywhen - 01 Nov 2006 12:33 GMT
> You can join tables from different databases using IN like:
>
> Select * from MyTable IN'C:\myother.mdb'

At first glance I thought you meant using IN a WHERE clause as an
alternative to the JOIN syntax.

For the purposed you actually mean, I prefer the <schema>.<table>
syntax (less confusion with the other IN keyword!):

SELECT col1
FROM [MS Access;DATABASE=C:\myother.mdb].MyTable;

Jamie.

--
AccessVandal - 01 Nov 2006 11:56 GMT
Hi RON,

Ok, here is something for you to start with.

Dim Conn As ADODB.Connection
Dim rs As ADODB.Recordset

Set Conn = New ADODB.Connection
Set rs = New ADODB.Recordset

Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
Conn.Open "F:\YourFolder\Your.mdb", "admin", ""

rs.Open "tblContacts", Conn, adOpenStatic, adLockOptimistic

With rs
Do While Not rs.EOF
Debug.Print rs!FirstName
rs.MoveNext
Loop
End With

rs.Close
Conn.Close

>RON wrote:
>OK I need your help, I need to do this assignment for a class and am getting
>nowhere with it.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.