Macro converted to VBA doesn't work the same way

spudracer

Here and there
Local time
Today, 03:39
Joined
Jul 1, 2008
Messages
199
Big surprise, right? A converted Macro doesn't work the same way in VBA?

I've got a Macro that will update a date field based on the users selection. As a macro, it works perfectly. However, I'm wanting to sign my database so I can rid my users of the Security Content warning whenever they open it. Using the .mdb format, I don't have the Publish option and as much as I would love to be in the 2007 file format, I can't due to some users not having Access 2007 on their stations.

Here is what was converted over from the Macro:
Code:
[Forms]![frmReports]![Due to J0] = Eval(IIf([Forms]![frmReport]![Report Type] = "A","B","C"),[Forms]![frmReport]![MajorRptDue],[Forms]![frmReports]![RptDue])

Any clues on what I'm doing wrong here? Again, this is in Access 2007 using the .mdb format. Also, this is used as an event procedure after the Report Type is selected.
 
You shouldn't have to convert the macro if you have it working the way you want. Signing it doesn't require that macros not be in the database.
 
You shouldn't have to convert the macro if you have it working the way you want. Signing it doesn't require that macros not be in the database.

My whole reason for converting it is to get away from having to enable content everytime the database is opened. Moving to signed VBA code, just makes it easier (but not on my end). :)
 
Again, I will state that you do not need to convert the macro to VBA in order to do this. You just need to put the database in a trusted location and if the location isn't set as one, you set it from within Access Options. No need to sign the VBA code either. Just set the trusted location. If you need to do it manually you can go here for the registry settings to set which will do it as well.
 
Neither of these options are available to me on my network. Good info though, thank you!
 

Users who are viewing this thread

Back
Top Bottom