Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

Code does not work

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TKM - 03 Jul 2007 22:00 GMT
I converted all my macros to code and I also tried some test code (basic
docmd open) open form stuff. None of my code seems to work. Macros are the
only thing that works and not the code. I have office 2007 and Vista. Do I
need to install the jet db or? what is going on?
Klatuu - 03 Jul 2007 22:26 GMT
Converting the code is not enough.  It doesn't have any idea where to put the
code.  You will have to go to each place in your app where you run a macro
and replace the execution of the macro with the executioin of the code
converted from that macro.
Signature

Dave Hargis, Microsoft Access MVP

> I converted all my macros to code and I also tried some test code (basic
> docmd open) open form stuff. None of my code seems to work. Macros are the
> only thing that works and not the code. I have office 2007 and Vista. Do I
> need to install the jet db or? what is going on?
TKM - 03 Jul 2007 22:46 GMT
I dont understand what you mean? It now shows an event procedure where the
macro use to be in my properties. Such as On Click on my button. The code it
converted to looks fine so why does it not work? Are you saying I must do
something further? Please explain.

Thank you

> Converting the code is not enough.  It doesn't have any idea where to put the
> code.  You will have to go to each place in your app where you run a macro
[quoted text clipped - 5 lines]
> > only thing that works and not the code. I have office 2007 and Vista. Do I
> > need to install the jet db or? what is going on?
Klatuu - 03 Jul 2007 22:48 GMT
Can you post one of your converted events, Please?
Signature

Dave Hargis, Microsoft Access MVP

> I dont understand what you mean? It now shows an event procedure where the
> macro use to be in my properties. Such as On Click on my button. The code it
[quoted text clipped - 12 lines]
> > > only thing that works and not the code. I have office 2007 and Vista. Do I
> > > need to install the jet db or? what is going on?
TKM - 03 Jul 2007 23:00 GMT
Here is a basic open form code based off a button from my main form. It is on
the on_click event...

'------------------------------------------------------------
' Ctl_Exit_AMTS_Click
'
'------------------------------------------------------------
Private Sub Ctl_Exit_AMTS_Click()
On Error GoTo Ctl_Exit_AMTS_Click_Err

   DoCmd.Quit acPrompt

Ctl_Exit_AMTS_Click_Exit:
   Exit Sub

Ctl_Exit_AMTS_Click_Err:
   MsgBox Error$
   Resume Ctl_Exit_AMTS_Click_Exit

End Sub

> Can you post one of your converted events, Please?
>
[quoted text clipped - 14 lines]
> > > > only thing that works and not the code. I have office 2007 and Vista. Do I
> > > > need to install the jet db or? what is going on?
TKM - 03 Jul 2007 23:10 GMT
I forgot to mention that I just went back and checked my other database and
none of my code works. Only macros. Hope this helps in drilling down my
issue. Thanks so mcuh for your help!

> Can you post one of your converted events, Please?
>
[quoted text clipped - 14 lines]
> > > > only thing that works and not the code. I have office 2007 and Vista. Do I
> > > > need to install the jet db or? what is going on?
missinglinq - 03 Jul 2007 23:25 GMT
I just read somewhere today that VBA support is turned off, by default, in
Access 2007. I think you'll have to turn it back on, but I have no idea where
you'll find it. Try Help.

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

TKM - 04 Jul 2007 17:46 GMT
I am sure this may be the problem as none of my code works. Does anyone out
there know how to turn on the VBA support?

> I just read somewhere today that VBA support is turned off, by default, in
> Access 2007. I think you'll have to turn it back on, but I have no idea where
> you'll find it. Try Help.
Douglas J. Steele - 04 Jul 2007 18:00 GMT
You know, I suggested this to you days ago!

You need to add the path where your database is stored to the Trusted
Locations. You do this through the Office Button | Access Options | Trust
Center | Trusted Locations.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I am sure this may be the problem as none of my code works. Does anyone out
> there know how to turn on the VBA support?
[quoted text clipped - 4 lines]
>> where
>> you'll find it. Try Help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.