Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Aug 2003
    Posts
    39

    Unanswered: Help Soon Please!!

    I have a form that works sometime but not at others. It seems as though if I open it through the databse window it will work and all the calculated totals in control boxes will work. But if I open it through a button with a simple Macor (OpenForm) a Name error appears in all of the text boxes. Any ideas here?

    Thanks!!

  2. #2
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198

    Re: Help Soon Please!!

    Originally posted by wauger20
    I have a form that works sometime but not at others. It seems as though if I open it through the databse window it will work and all the calculated totals in control boxes will work. But if I open it through a button with a simple Macor (OpenForm) a Name error appears in all of the text boxes. Any ideas here?

    Thanks!!
    Try going to the totals and renaming them with _controlbox after the name. see how that works.
    Jim P.

    Supoorting Oracle, MSSQL7, Sybase 8, & Pervasive. Confusion Reigns

  3. #3
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465

    Question

    " But if I open it through a button with a simple Macor (OpenForm) a Name error appears in all of the text boxes. ".
    Where is this button, in the same form, in other form, in other base...
    where is..?

    Sorry for my english
    Saludos
    Norberto

  4. #4
    Join Date
    Aug 2003
    Posts
    39
    Originally posted by Norberto
    " But if I open it through a button with a simple Macor (OpenForm) a Name error appears in all of the text boxes. ".
    Where is this button, in the same form, in other form, in other base...
    where is..?

    Sorry for my english
    main menu, switchboard,...etc

  5. #5
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Good
    The Main Menu ( Control Panel ) is in the same base that de form or is in other base?
    Saludos
    Norberto

  6. #6
    Join Date
    Aug 2003
    Posts
    39
    Originally posted by Norberto
    Good
    The Main Menu ( Control Panel ) is in the same base that de form or is in other base?
    Same database

  7. #7
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    The Source Control for the form and the text box are in the same base
    Saludos
    Norberto

  8. #8
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198
    Originally posted by wauger20
    Same database
    Instead of using a macro to open the form
    Open your main form with the button on it in design mode.
    Select the the button that opens the sub-form
    Go to the properties page
    Under the events tab select the On Cick and change it to [Event Procedure].
    Then of to the right click on the three dot button.
    When the code screen pops up type in
    DoCmd.OpenForm "<formname>"

    with the <formname> = to the name of the subform.

    Save and close. Then run it.

    Then let us know what you get.
    Jim P.

    Supoorting Oracle, MSSQL7, Sybase 8, & Pervasive. Confusion Reigns

  9. #9
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    I send to you a Sample.mdb in a zip file format, that work like you want.
    Check its.
    Attached Files Attached Files
    Saludos
    Norberto

  10. #10
    Join Date
    Aug 2003
    Posts
    39
    Originally posted by Norberto
    I send to you a Sample.mdb in a zip file format, that work like you want.
    Check its.
    I dont think the problem lies in the button. When I open the form from the databse window and the close it and try to reopen it again the same #Name error appears. But if I close the database and then renter the form will work fine. Any ideas?

  11. #11
    Join Date
    Sep 2003
    Posts
    10
    I think you just will have to set correct values while your form is initializing (Form_Open, Form_Load... events). Where does the data come from ? (your '#Name' means that the data is not available, right ?)

  12. #12
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198
    Originally posted by wauger20
    I dont think the problem lies in the button. When I open the form from the databse window and the close it and try to reopen it again the same #Name error appears. But if I close the database and then renter the form will work fine. Any ideas?

    Did you try going to the totals boxes on the subform and rename them with _controlbox after the name? Did that work?


    What may be happening is the first time you open the form it works, the second time Access has the totals tagged to the formula caught as global constants (in its tiny little brain) and the text boxes are trying claim they are the same constants/variables. One is an object and the other is variable which doesn't work well together.
    Last edited by jimpen; 09-04-03 at 15:42.
    Jim P.

    Supoorting Oracle, MSSQL7, Sybase 8, & Pervasive. Confusion Reigns

  13. #13
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    I thing like SaMy.
    Something in the form is making that the data is bad in the Tbl of the base. Check the event.
    Saludos
    Norberto

  14. #14
    Join Date
    Aug 2003
    Posts
    39
    Thanks everybody!
    Simply changing the name of the text box or addibng _controlsource doesnt seem to work. However, I if copy the entire form and paste it as a new name it will work for a while and then seem to die out.

  15. #15
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198
    Originally posted by wauger20
    Thanks everybody!
    Simply changing the name of the text box or addibng _controlsource doesnt seem to work. However, I if copy the entire form and paste it as a new name it will work for a while and then seem to die out.
    How big is the DB? Any sensitive data? Can you zip it up and and attach it here? And BTW what version of Access?
    Jim P.

    Supoorting Oracle, MSSQL7, Sybase 8, & Pervasive. Confusion Reigns

Posting Permissions

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