troubleshooting Question

ADP - Open SQL View in VBA

Avatar of simon_kirk
simon_kirkFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft Access
5 Comments1 Solution1430 ViewsLast Modified:

Moving an Access application to SQL/ADP and having a few problems with Views.  I've created the Views required on SQL, but I want to use the results of this view within a labels caption on a form.

I've figured out SPs:
  Dim dbLocal
  Set dbLocal = CurrentProject.Connection

But for views don't know how to procede further then this:
  Dim dbLocal, myViewResult
  Set dbLocal = CurrentProject.Connection
  Set rst = New ADODB.Recordset
  rst.Open "MyView", CurrentProject.Connection
  myViewResult = ...
  myLabel.Caption = "Results Returned: " & myViewResult

The view only returns one column and one row.  Anyone able to finish/re-do this to get the result im after?

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros