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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 Report

Status
Not open for further replies.

browneye

Programmer
Nov 21, 2000
82
US
Sir,
I am using SQL-Server as backend and using Access 2000 as front end.
I am using .adp . Now here is my question...
I have two servers..
1>Test Server
2>Production Server
I am using test server to develop application. Now I developed report on test server. Is there anyway I could run it production sever without changing >Connection from file menu ?
Because I use vba code to connect server in my application is there any way yo use vba code and run report ?
One more question :).. is there any way i can suppress "close box" (X) on my application when I run it?
Sample code would be great help.

Thank you in advance
 
I believe a project (adp) only has one connection, but you could probably replace it in vba code for the duration of the report. I haven't tried myself. Unfortunately, the recordsource on a report is a string and there is no recordset object like there is on a Form. If it was a Form you can create a vba recordset and set the Forms recordset to the recordset you created, which could be connected to any data source.

If your requirement is for the user to test out the report, why not just create another small adp that is connected to the test server.

Another approach is to link the test database on the test server as a linked server in your production database. This way you can use the same connection in your adp. You can do this in Enterprise Manager or through Transact SQL. sp_addlinkedserver is the stored procedure that can be run in Transact SQL.
 
Thank you for input..Yeah you can change recordsource property but i couldnot find anything to change connection. You think it's possible to do it using sub-reports ? Please let me know.
 
No, I checked the currentproject.connection and it is read only so I don't believe it can be changed. The linked server would be one way to get at the test database from the current connection.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top