Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

run an access 2007 adp

Posted on 2011-03-24
8
Medium Priority
?
333 Views
Last Modified: 2012-08-13
I'm new to Access 2007.  Can I run and debug code like I can in VB6?  If so how?  I see a RUN menu option - like in VB6 - but when I click it does not seem to do anything.

Thanks
0
Comment
Question by:HLRosenberger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 58
ID: 35207208

 Well first thing is if you convert the DB to A2007 format (ACE), there are no more ADP's.

<< Can I run and debug code like I can in VB6?  If so how?  I see a RUN menu option - like in VB6 - but when I click it does not seem to do anything.>>

  What are you expecting it to do?  In VBA, most of the time you run/debug things by using the debug window.

JimD.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 35208705
This is access 2007.  I do have an ADP.  That's the project file, no?

I'm expecting it to run, in Debug mode,  as it would when running normally.  Like a VB6 project, or a VB.NET project.
0
 
LVL 58
ID: 35208839
<<This is access 2007.  I do have an ADP.  That's the project file, no? >>

  Yes, but then you must not have converted it.  A2007 supports the older formats, but you won't have access to A2007 specific features.

<<I'm expecting it to run, in Debug mode,  as it would when running normally.  Like a VB6 project, or a VB.NET project. >>

  OK.  Wasn't sure that's what you were refering to.  No, you won't have that with VBA.

  You either need to start by opening the DB, by running a macro that calls a procedure, or calling a procedure from the debug window.

JimD.
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 11

Expert Comment

by:kbirecki
ID: 35210189
I think you are looking for the code ide area.  I'm not at my computer, but from memory, I think you need to open Options and enable developer mode or something like that, then you get a new Developer tab where you can directly get to code and debugging features.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 35210392
OK.  So I added a procedure called StartApp.   ON the CurrentDatabase tab, for DisplayForm, I have the form that is initially displayed.  How do I call this?   My form is Form_frmMainMenu.   I tried Form_frmMainMenu.Visible = true,  and this seems to work - sometimes.   ????

Bottom line - I want to be able run and debug the code.
0
 
LVL 11

Expert Comment

by:kbirecki
ID: 35212087
Is it still:
DoCmd.Open acForm, "frmMainMenu"
0
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 35213183
<<How do I call this?>>

With that set as the startup form, opening the DB will open that form.

Rather than or in addition to, you also can create a macro with the Open Form action.   Once this macro is saved, you can then execute it at any time and the form will open.

 In addition, in place of the startup setting, if you call this macro 'AutoExec', Access will execute this macro when the DB is opened.

  Last, you can create a sub procedure with the DoCmd.OpenForm statement:

Public Sub StartAPP()

DoCmd.OpenForm "frmMainMenu"

End Sub

  Then with the VBA editor open (alt/F11 from Access), call up the debug window (Ctrl/G) and type:

  Call  StartAPP

JimD.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 35214791
Thanks.  that worked
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question