Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    wilpeter is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    18

    A2003 mdb Form field doesn't automatically populate in A2010

    An input form, already filtered by a query, correctly displays the records - whether opened in A2003 or A2010. However, when a choice made in a combo box field populates a field called RefNb, it acts differently when run within A2010 than when run in A2003. It should automatically populate a second field called CourseFee (which is not a combo box). It does in A2003 doesn't in A2010. Here's the weird part:
    If I return to that RefNb field and reselect the same value, this time it populates the CourseFee correctly in A2010.
    The tests I've done in comparing the field properties and form properties have revealed nothing (other than there are more properties in 2010).


    I've tried it with several records always with the same result: initially it ignores the value chosen, then upon repeat uses it.
    This cannot be the first time this has been questioned (after 3 years in use).
    History: The database has been in use without major change using A2003 for nine years. A2010 is being operated within several computers with various Op Sys. Event Procedures were used, but generally Code was not. I don't know Visual Basic.
    Any suggestions would be appreciated. Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What mechanism was used to populate the CourseFee control?

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Quote Originally Posted by wilpeter View Post
    Event Procedures were used, but generally Code was not. I don't know Visual Basic.
    Are you saying macros are used instead of VBA? Show the macro properties used to save the data. Or provide the db for analysis. Follow instructions at bottom of my post. Identify objects involved.
    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.

  4. #4
    wilpeter is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    18
    Quote Originally Posted by RuralGuy View Post
    What mechanism was used to populate the CourseFee control?
    Simplest answer is that the Relationships must be the mechanism, since the field is simple. The data entry mode form called frmRegister (source table tblRegister) feeds records based on filters provided through a switchboard dialog (Memb# and Semester like 134). The database has too many fields and records to create a mini-version for you; so if nothing comes to mind, just disregard the question. It works well enough with 2003 still, so we'll live with the repeat enter. Thanks for your responses.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Selection in combobox does not 'automatically populate a second field' without code - either macro or VBA. Why it works in 2003 and not 2010 is a mystery.
    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
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It could be the events engine. Try adding a DoEvents to the code.

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    I'm a little confused by your original description, but does any code execute when the Form is opened by simply clicking on it, in the Nav Pane? In version 2007 and later, when no VBA code executes, the problem is usually that the folder holding the database hasn’t been designated as a "Trusted" location.

    To "Trust" your folder, click:
    • Office Button (top left)
    • Access Options (bottom of dialog)
    • Trust Center (left)
    • Trust Center Settings (button)
    • Trusted Locations (left)
    • Add new location (button)

    Linq ;0)>

  8. #8
    wilpeter is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    18
    Thank you for steering me in the right direction. A Set Value macro had been attached to an After Update property in error during a recent update.
    All is well with the world. Much appreciated.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

  10. #10
    wilpeter is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    18
    Quote Originally Posted by RuralGuy View Post
    Glad we could help.
    The problem wasn’t solved after all, just changed. I’ve built a similar mock database to demonstrate. I have Course Fee initially set to the most common, the member fee. But the Course Fee will occasionally be changed to match one of the other fees in the sub form. So Course Fee must be editable and permanent, so not calculated. If After Update property is used, it changes back after editing; and if Before Update instead is used, it cannot be edited. It must be retained, so it cannot be a calculated field. Any suggestions?
    So how do I attach the database? Thanks.

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Click Go Advanced below post editor. Attachment Manager is below the Advanced Editor window.

    Other instructions at bottom of my post.
    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.

  12. #12
    wilpeter is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    18

    Attached is enrollment zipped mdb file

    Thanks, see file (in 2002/3 format). This PC doesn't have 2010.
    Attached Files Attached Files

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    What steps should we take to replicate the issue? I opened the switchboard and selected 'Add a Registrant'. Form opens and the course fee box shows 0.
    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.

  14. #14
    wilpeter is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    18
    Click the Search button, select a member. Click the Course# combo box, and pick a course. The Course Fee is force-fed the Member Fee from the sub-form below. I want to be able to change it sometimes to the higher or lower Fee.

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    The subform is bound to the lookup table tblCourses. If you change data in the subform you change it in that table. You need to input the desired value into the main form Course Fee textbox which is bound to field in tblRegister. You can use code to populate that textbox with the standard fee and it will be editable. Right now I don't see that box get populated.

    Include the CrsFee field as a column (can be hidden) in the course combobox then code in the combobox AfterUpdate event can set value of the textbox be referencing combobox column. I only use VBA:

    Me.CrsFee = Me.RefNb.Column(2)
    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.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 07-31-2013, 08:08 AM
  2. Automatic calculation of table field (A2003)
    By GraeagleBill in forum Programming
    Replies: 9
    Last Post: 04-20-2013, 12:06 PM
  3. Replies: 2
    Last Post: 12-30-2011, 07:19 PM
  4. Replies: 3
    Last Post: 10-17-2011, 10:36 PM
  5. Replies: 3
    Last Post: 10-03-2011, 02: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