Solved

run an access 2007 adp

Posted on 2011-03-24
8
325 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

777 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