Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access data from another DB on SQL Server.

Status
Not open for further replies.

CharlesCVA

IS-IT--Management
Oct 20, 2005
19
US
Hi,

I have built a form which is to be a U/I for data handling for an SQL Server 2000 DB. I am trying to pull a record from another database's table and having trouble. I have tried doing a VBA Coded connection but with required security settings on the SQL server i keep getting errors i cant work around. Is there a simple way i can get access to grab 1 record with a where clause. and throw the varchar of a column on that record into a string or field on my access form? ive been working on this a while. ive tried sql procedures and functions...but keep hitting walls i cant get around.

- Why didnt we just start out keeping things simple?
 
i was able to do it with this...

'Insert matched data column into temptbl.
DoCmd.RunSQL MatchedRecordQRY

'Load temptbl into listbox (hidden)
List35.RowSource = "SELECT temptbl.* FROM temptbl"
List35.Requery

'display listbox data on textbox.
txtMatchedMarking.Value = MatchedRecord + List35.Column(0, 0)

'drop table and reset listbox source to Nada!
List35.RowSource = ""
DoCmd.RunSQL "drop table temptbl"



Please let me know if you see anything wrong about this. (memory management wise) It is working fine.

- Why didnt we just start out keeping things simple?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top