form open issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • djames07
    New Member
    • Sep 2010
    • 1

    form open issue

    form #1 is view form #2 is for editing when operator hits edit button form #2 opens with information from a text box on form #1 this worked fine with office 2003 but doesn't work with office 2007
    [stLinkCriteria = "[BI Quote#] = " & "'" & Me![BI Quote#] & "'"]
    [DoCmd.openform stDocName, , , stLinkCriteria]
    could library reference be issue?
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Your OpenForm statements seem fine to me (except the additional bracket at the end of the first line, which is a typo introduced in posting I reckon).

    It's more likely that you need to define your database as being in a trusted location. Office 2007 by default blocks execution of VBA statements unless you declare that the application is in a trusted location.

    Whan you open a database (or another Office application) that is not in a trusted location, by default macros (VBA code) are turned off. You can turn these back on again, but unless you define that the DB is in a trusted location you will have to keep doing this every time you run the application.

    It is not a reference/library issue, unless there are missing references in your project which are preventing VBA from running at all. However, in these cases you tend to get other errors such as routine Date() functions etc being deemed invalid, for instance.

    -Stewart
    Last edited by Stewart Ross; Sep 15 '10, 12:39 PM. Reason: Added note about missing references

    Comment

    Working...