Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    OK, the biggest problem was that you are missing the two lines that should be at the top of EVERY module.


    The lines are:
    Code:
    Option Compare Database
    Option Explicit
    I went through the code and cleaned/prettied it up.
    I removed the look up FIELDS in the tables (they are now text boxes, not combo boxes).
    I arranged the table fields - FK fields should be after the PK field, not halfway down the list of fields. (easier reading)
    I renamed a couple of controls on "frmAwards"..... the list boxes now have a prefix of "cbo".

    When creating bound controls, Access names the control the same as the field name. I always take the time to rename the control to avoid confusion. (I only renamed a few )

    Yellow background controls (on forms) are how I indicate hidden controls. (frmAwards)

    I did a /decompile, then compiled the dB.


    Any errors with this dB??
    Attached Files Attached Files

  2. #17
    MatthewR is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    118
    Thanks. When I decompiled and compiled, I got an error on a couple vba lines that were like
    Code:
    DoCmd.OpenForm "frmMainMenu", acViewForm
    It highlighted acViewForm and said Variable Not Defined. Not sure what's up with that, but I removed acViewForm since it's not really necessary anyhow.

    Still not automatically getting compile errors, unless I proactively compile. I think I might just give up on that, though. Unless you have any other suggestions.

    But those changes were good changes. Thanks for helping me out with that.

  3. #18
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Code:
    DoCmd.OpenForm "frmMainMenu", acViewForm
    This errors because there is no parameter named "acViewForm". You would use "acNormal".

    Are you expecting more compile errors? I don't get any more when I compile your code....
    If you have "Option Explicit" at the top of every module, you only should get compile errors when you edit/add code. Errors in the code should be shown red.


    Good luck with your project.

  4. #19
    MatthewR is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    118
    Thanks for the info.

    I'm not expecting more compile issues with my current code, and compiling the database works just fine- when I compile, any errors generally come up.

    My issue is that if I click a command button, or otherwise run code, and there is a compile error in that code, I don't get an error message. Access simply doesn't run the code and doesn't tell me why. And in some cases, it prevents me from closing the database afterward.

    But it's an issue that I can live with.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Current entry not appearing
    By trident in forum Queries
    Replies: 1
    Last Post: 04-12-2016, 08:20 AM
  2. Query sum is not appearing
    By trident in forum Queries
    Replies: 3
    Last Post: 12-15-2014, 06:23 AM
  3. Replies: 4
    Last Post: 06-21-2014, 05:43 AM
  4. Replies: 1
    Last Post: 09-05-2012, 01:36 PM
  5. Replies: 10
    Last Post: 07-25-2011, 12:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums