Results 1 to 10 of 10

Thread: Compare 2 Forms

  1. #1
    Join Date
    Sep 2002
    Posts
    8

    Unanswered: Compare 2 Forms

    I have 2 forms that should be identical but behave differently. I copied the VBA code from "good" form to "bad" form. "Bad" form still doesn't execute properly. I can only conclude that the difference isn't the VBA code.

    So, I ask the question: How can I easily compare the 2 forms for differences in properties (or anything else)? I have eyeballed both forms and see no differnces but I know there must be one.

    Many thanks in advance.

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    Look at the form properties in design view or post a copy .zipped up here...
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  3. #3
    Join Date
    Sep 2002
    Posts
    8

    Compare 2 Forms - see attached

    Please see attached.

    Thanks.
    Attached Files Attached Files

  4. #4
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    Not immediately obvious - can you describe the error in more detail please?

    If it errors on a piece of code, which line?
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  5. #5
    Join Date
    Sep 2002
    Posts
    8

    More detail...

    Thanks for the reply.

    The form frmMonDataEntry is opened via a docmd.openform command in frmData Entry (see attached). There is a where condition as the 4th parameter: strmonth = 'June', as an example.

    The problem is that in the -good version, the value of strMONTH is correctly passed to frmMonDataEntry (June, July etc.). In the -bad version, strMONTH is not passed and is null in frmMonDataEntry.

    This really has me stumped.

    Thanks!
    Attached Files Attached Files

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    There are no form properties that I am aware of that would produce such an error.

    And since your database only contains one single form, presumably the "bad one" but who knows, there is no way to even run a basic test, making diagnosis pretty much impossible.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Sep 2002
    Posts
    8

    Question Reply to StarTrekker

    Thank you for the reply.

    My original post contained both the good and bad forms. In reply to another poster, I provided the calling form in order to show that the docmd.openform command was coded correctly. It was never my intention to ask for debugging assistance but rather to ask how to easily compare properties on two forms.

    You and others might be interested to know that I "accidentally" stumbled upon a solution. I opened the bad form in design mode and changed the name of the text box whose control source is strmonth. I changed the text box name from MONTH to MONTH-x. The form clearly did not open properly as there were references to MONTH. I then changed the name back to MONTH, saved the form and it now works!

    I have no clue what the source of the issue is but I'm thinking Access "bug" or shall I call it an "undocumented feature" ;-).

    Thanks again for the reply.

  8. #8
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    using a reserved word for the name of a control?
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  9. #9
    Join Date
    Sep 2002
    Posts
    8

    Reserved Word

    By way of explanation, I wrote this application many years ago when I was a novice. I, too, recently noticed that the text box name was a reserved word and considered this to be suspect.

    All I can report is when I changed the name and then changed it back, the form now receives the where condition properly.

    Thank you for your reply.

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Glad you got it sorted
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •