Results 1 to 13 of 13
  1. #1
    jryel1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    6

    Textbox shows #Name? instead of actual value

    I have a form with a textbox that is showing a column of a combo box. When i first create the textbox it works great. The moment I close and reopen the database, it shows #Name?. The code for the textbox is:

    =[cboOwner].[column](1)



    I am sure that the textbox control source is typed correctly. The combo box name is cboOwner. Why is it not retaining the value once I close and reopen the database?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Forms do *not* store data, tables do. The ComboBox has no initial value so the TextBox is basically lost at that point.

  3. #3
    jryel1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    6
    Found the answer.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Care to share your answer with others that read this forum? And why not go ahead and use the Thread Tools and mark this thread as Solved?

  5. #5
    jryel1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    6
    actually its partially solved. The textbox name and the column in the combo box were named the same thing. I changed the name but it still happens when I exit and come back into the database.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is your ComboBox bound (does it have a ControlSource)?

  7. #7
    jryel1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    6
    Yes it is bound and have a control source.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Does the cbo display a value when you first open the form?

  9. #9
    jryel1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    6
    Yes it does. It displays the bound column.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Hmm...try putting a Me.TextBoxName.Recalculate in the CurrentEvent of the form. ...using your TextBoxName of course.

  11. #11
    jryel1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    6

    Smile

    Tried puting Me.txtFirst.Recaluclate in the On Current and it gives an error that it doesnt recognize Me. But for some reason, now the text box is working fine. I have closed and opened the database several times and it is no longer showing #Name? in the textbox. That is wierd. I will keep you posted.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I would *import* the current db into a fresh new db now. It sounds like you have been working with some corruption. http://www.btabdevelopment.com/ts/impnew

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You might also take the time and use the Thread Tools to mark this thread as Solved.

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

Similar Threads

  1. CMD Button shows a 2nd dotted focus box
    By mapline in forum Forms
    Replies: 1
    Last Post: 12-02-2010, 05:19 PM
  2. Replies: 3
    Last Post: 10-29-2010, 10:13 AM
  3. Report Shows Flags on all pages
    By JohnBoy in forum Reports
    Replies: 3
    Last Post: 06-20-2010, 06:08 PM
  4. Replies: 3
    Last Post: 12-23-2009, 08:50 AM
  5. All Access Objects shows nothing
    By Viwadd in forum Access
    Replies: 5
    Last Post: 05-29-2009, 02:23 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