Results 1 to 11 of 11
  1. #1
    HowardOfOcal is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2012
    Location
    Near Ocala Fl
    Posts
    5

    Text Box Won't Bind

    This is driving me nuts.



    In Access 2010 I opened an .mdb file originally created with Access 2003. I added a field to a table, then added the field to a query. I opened a form (in design mode) which used the query as its source.

    I then drug the field from the form's field list to the form.

    This always worked before, but now I get the dreaded #NAME? error in the field.

    I can update the field in a query data sheet view, but it won't bind to the form.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    If Compact & Repair does not fix, might have to rebuild something, maybe even the table.

    Do you have to retain the mdb version?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    HowardOfOcal is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2012
    Location
    Near Ocala Fl
    Posts
    5
    Quote Originally Posted by June7 View Post
    If Compact & Repair does not fix, might have to rebuild something, maybe even the table.

    Do you have to retain the mdb version?
    Compact/Repair didn't help. I don't need the .mdb. I looked up on Microsoft support how to convert it to 2010 but the directions didn't work - I couldn't find the tabs they described.

    It can't be that hard to convert, I just don't know how.

    What's interesting is that I deleted several fields from the form, from the associated query and its supporting table. Then I closed the file and reopened it. I then redefined the old fields and the new one in the table. I put all of them in the query and then drug them to the form. The old fields worked, the new one didn't.

    I'd love to hear how that's a design feature!

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    The best way to convert to the newer version is to IMPORT ALL OBJECTS into a new, blank 2010 ACCDB file. It will eliminate a lot of problems that will still occur if you try to use the built in conversion stuff.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I agree with Bob. 2003 to 2010 is a fairly big jump. I did a conversion at work from 2003 to 2007 with only a couple of small issues by doing a Save As. If that is not available in 2010 (not at home to check on this), then do import.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    I've just found that the safest, most effective way to not experience issues is to do the import instead of the save as.

  7. #7
    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
    A RecordSource of a Form does not update when you add a field to a table of the RecordSource. Delete the RecordSource of the form and then assign it again.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    RG, that depends:
    If RecordSource is an SQL statement and the statement uses the wildcard, then the new field will be available to the form. If doesn't use wildcard, no reason to delete, just open the query builder from the RecordSource and add field to the grid.

    If it is a query object and the field is added to the grid, then it is again available to the form.

    And if the RecordSource is just the table, then the new field is definitely available to the form.

    In this case, it seems the OP is seeing the field in the form's RecordSource, but ControlSource is not recognizing the field.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    HowardOfOcal is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2012
    Location
    Near Ocala Fl
    Posts
    5
    Well, I may have been cursing Access 2012 when it wasn't the problem.

    First, I did what you suggested and imported all my stuff into a new 2012 database. But, the problem was the same.

    Then, I was about to give up. So, I reinstalled Access 2003 and guess what, I couldn't add a field to the form in the original .mdb file with 2003 either!!!!!

    I then used Access 2003 to open backup copies of the .mdb database from years ago. I couldn't add fields to the form there either. But, I could add fields to other forms.

    So, I went back to Access 2012 and my .accdb version and I could add fields to other forms there as well.

    So, it currently appears that there has been a problem in one particular form for years but I just discovered that fact. Now the trick is to figure out what is going on with that one particular form. Some of the event procedures triggered by controls on this form do use a lot of SQL so I'm trying to make myself understand some of the comments that have been made. I'm not a guru Access developer.


    ------Well, it's the next morning now and I've solved the problem. Operator Error!-----

    This is the danger of trying to modify an application originally written years ago. I forgot that I overrode the query behind the form with a me.recordsource sql statement but didn't include the new field in the query. So, no wonder it couldn't bind to the form.

    My apologies to Access 2010. It works great.
    Last edited by HowardOfOcal; 01-29-2012 at 08:48 AM. Reason: Update comments

  10. #10
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by HowardOfOcal View Post
    Well, I may have been cursing Access 2012 when it wasn't the problem.
    Since there isn't an Access 2012 then it would be obvious that wasn't the problem ( - I know, you meant 2010).
    First, I did what you suggested and imported all my stuff into a new 2012 database. But, the problem was the same.
    2010
    So, I went back to Access 2012
    2010
    ------Well, it's the next morning now and I've solved the problem. Operator Error!-----

    This is the danger of trying to modify an application originally written years ago. I forgot that I overrode the query behind the form with a me.recordsource sql statement but didn't include the new field in the query. So, no wonder it couldn't bind to the form.

    My apologies to Access 2010. It works great.

  11. #11
    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
    Thanks for posting back with your success and solution.

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

Similar Threads

  1. bind field to adodb.recordset field
    By gem1204 in forum Access
    Replies: 7
    Last Post: 04-26-2012, 01:07 PM
  2. Replies: 2
    Last Post: 03-01-2012, 12:21 PM
  3. 1,000,000 number bind
    By Lathian in forum Access
    Replies: 7
    Last Post: 09-12-2011, 01:43 PM
  4. Replies: 6
    Last Post: 06-13-2011, 12:14 PM
  5. Replies: 0
    Last Post: 06-14-2009, 09:33 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