Results 1 to 3 of 3
  1. #1
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    313

    Combo Box Rowsource not Retained on Transfer

    I have a 2000 database running with Access 2007. I have several forms that use a number of combo boxes. All the combo boxes had a rowsource of a table in error (for example a customer table). They should have had the field selected. For example, the CustName control should list the names from the customer file. The CustState should list the states, etc. Instead every dropdown listed all the customer numbers since that was the first column in the table.



    I zipped the database and transferred it from the client site to my home/office computer. I modified the forms to correct the combo boxes to list only the appropriate columns from the Customer table. Tested and worked fine. Then I zipped it and sent it back to the client's computer.

    When I tested it on the client's computer, I got some very strange results.

    1. If I test any combo box dropdown, nothing changed... it still listed just the customer numbers.
    2. I open the form in design mode, changed something insignificant, saved it... no change.
    3. I open the form in design mode, edit the rowsource for some of the controls, one at a time, to open the query design window, DIDN'T CHANGE ANYTHING, JUST SAVED IT AS IS, saved the form and WALLAH it worked for those controls. The other controls still didn't change.
    4. I had to do this for every combo box control to make it work.

    Any ideas why I had to go through these steps and how can I correct it?

    Thanks, Eddie

  2. #2
    PRMiller is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    St. Paul, MN
    Posts
    16
    Are both machines (yours and your client's) Access 2007? Or are you running on 2007 with your client on 2000?

    Does your database have VBA code? Have you tried a decompile? Here are the steps:

    1. Make a backup of your database.
    2. Create a shortcut with a path to your MSACCESS.EXE executable, the path to the database, and the "/decompile" switch. Using Access 2007, my shortcut target looks like this:
    "C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "D:\Projects\MyDatabase\MyDatabase.accdb" /decompile
    3. Run your shortcut while holding the Shift key to bypass startup code, if any.
    4. Your database should now be open. Holding the Shift key again (if necessary), run a Compact and Repair.
    5. Open Visual Basic (Alt-F11), select Debug > Compile.
    6. Select File > Save.
    7. Compact and Repair again.

  3. #3
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    313
    Both environments are virtually identical. Access 2000 backend and SQL Server 2008 R2 backend and Access 2007 frontend.

    Decompile/Compile didn't change anything.

    More info... has nothing to do with zip and transfer. I can have a test database with forms whose combo boxes contain DISTINCT in row source query that work correctly. If I import them into a production database, I lose the DISTINCT part of the query. If I open the form in design mode, open the row source query, close the query builder window without changing anything, go to form view, it works correctly. Here's another part that's weird. If I close the form and say "No" to save changes, it's still "fixed". When I open it again, it works correctly... for that combo box only. All the other combo boxes are still broken.

    So, next, I go through this process and fix ALL the combo boxes (there's only about five), test in form view, save with "No" to update. Open form and now all combo boxes work. Now, here's another weird thing. If I delete this form and re-import the same form from the test database, all the combo boxes work correctly.

    It's like the row source queries are kept someplace outside the form itself until the row source query is opened in the query builder window, then the row source is re-aligned with the correct source.

    When I import the forms, I take the following steps... open the receiving database, delete the forms I'm getting ready to import, external, access import, select the forms, hit okay.


    Any help would be appreciated. Thanks, Eddie

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

Similar Threads

  1. RowSource question
    By ermcc in forum Access
    Replies: 3
    Last Post: 07-11-2012, 08:16 AM
  2. .RowSource Combo
    By white_flag in forum Access
    Replies: 1
    Last Post: 09-06-2011, 07:59 AM
  3. RowSource Value not writing to the Table
    By tbassngal in forum Queries
    Replies: 5
    Last Post: 09-03-2011, 12:16 PM
  4. combobox rowsource
    By dirkvw in forum Forms
    Replies: 3
    Last Post: 06-20-2011, 05:12 PM
  5. SQL Rowsource
    By DSTR3 in forum Queries
    Replies: 2
    Last Post: 12-06-2010, 11:06 AM

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