Results 1 to 6 of 6
  1. #1
    ksmith is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    59

    Weird Problem

    Good morning Access Forum community. I had a weird problem that I have never seen before and was wondering if any of you guys have had anything like this happen to you.
    I made a report yesterday that pulls data from a query. There’s nothing special about this report, it has a report header section, I have a field in the query named ‘Indexer’ and I am grouping on this ‘Indexer’ field so I have an Indexer header section where I display some header information about the Detail section. The Detail section list several fields from the query. Also in the Detail section I have a couple of text boxes that perform calculations.
    All of this is standard stuff, stuff that I have done many times before.
    Now for the WEIRD stuff. When I opened the report this morning the data in the ‘Indexer Header’ section as well as the text boxes used to display the calculations and the “Pages” section in the Page Footer section, all showed #NAME?
    To “Fix” the problem I changed the control source of the header data from this =[txtCatalogModelNumber] & " " & [txtModelDescription] & " 6,000 Piece Example"
    To
    = “Hello”
    Saved the report and when I opened the report, ALL of the text boxes that displayed #NAME? , displayed the correct data.


    I then replaced = “Hello” with
    =[txtCatalogModelNumber] & " " & [txtModelDescription] & " 6,000 Piece Example"
    Saved the report and when I opened the report all data is displayed correctly.
    Any ideas as to what may be going on?
    KSmith

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Formula's on reports need to reference the FIELD name in the report's record source. You also need to make sure that you do not have any controls named the same as the fields if they are being used in any formulas for any control sources.

    So, if you have a field named CatalogModelNumber and you have a text box on the report that is bound to that field, you would want to make sure to change the control name to txtCatalogModelNumber (or something different from the field). So, the question is - are you using FIELD names in the control source or names of controls? Use FIELD names and rename your text box if you have not done so (but if you have Name AutoCorrect turned on, and I suggest you turn it off, you will find that once you change your control name, the formula will change to use that name as well so you'll need to change it back to your field name).

  3. #3
    ksmith is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    59
    Thank Bob for responding,

    Ok, in the indexer header section I have the CatalogModelNumber field (Visible set to No), named txtCatalogModelNumber. Also have Model Description set the same way. In the indexer header section I have a text box named txtCatalogDescription with its control source using the 'Names' of the two fields that I have visible set to No.

    The other text boxes (that show some calculations) in the detail section are using the 'Names' of the text boxes that theyare using.

    Also what about the ="Page " & [Page] & " of " & [Pages] in the Page Footer section? When this report 'Works' it displays the pages correctly, but when it doesn't work it shows the #Name? like the rest of them.

    This report WORKED yesterday, meaning that it displayed all data correctly! This morning it works sometime and sometimes it doesn't.

    I have ran every report in this database and all of them work except this one. And all of these reports have been made by me, and I have used the same method on all of them.

    Again thanks for looking at this.

    KSmith

  4. #4
    ksmith is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    59
    Also,

    Name AutoCorrect is off.

    I just copied the Tables, Query and Report to another database and it displayed the data correctly.

    The report in the first database is still screwed up.

    KSmith

  5. #5
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Maybe corruption in the report. Try importing the report back from the other database. (best to use the IMPORT of the objects instead of copy and paste though)

  6. #6
    ksmith is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    59
    Bob,

    That's what I did and it now works in the first database as it should.

    I just remembered that yesterday I got the "MIcrosoft has encountered a problem and needs to close" I can't remember exactly what I was working on at the time but it could very well have been this report. Maybe that when it got screwed-up.

    Again thanks for the reply its nice to know thats there's a forum like this to help.

    KSmith

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 10-13-2011, 08:45 AM
  2. Weird problem after splitting DB
    By crowegreg in forum Programming
    Replies: 1
    Last Post: 09-09-2011, 09:50 AM
  3. Weird subform behaviour
    By crispy-bacon in forum Forms
    Replies: 3
    Last Post: 06-16-2011, 02:31 PM
  4. Weird Error
    By KevinMCB in forum Access
    Replies: 1
    Last Post: 02-16-2011, 02:23 PM
  5. Weird Form Control Problem
    By MWB in forum Access
    Replies: 3
    Last Post: 11-17-2010, 05:42 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