Solved

run an access 2007 adp

Posted on 2011-03-24
8
326 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

792 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