Solved

run an access 2007 adp

Posted on 2011-03-24
8
324 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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…
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

863 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

26 Experts available now in Live!

Get 1:1 Help Now