Solved

run an access 2007 adp

Posted on 2011-03-24
8
323 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 57
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 57
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
 
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now