Page 3 of 3 FirstFirst 123
Results 31 to 34 of 34
  1. #31
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    A general module is a code module not associated with a form or report. You can create a general module with the VBA menu Insert command.



    The code does call txtCity_AfterUpdate from txtInfo_AfterUpdate.

    'Does not work' means what - error message, wrong results, nothing happens? Since it is from your db, it really should work. I didn't modify anything else. Make sure the event properties still have the [Event Procedure] parameter.
    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.

  2. #32
    zashaikh is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    182
    I see. And I need to insert the code you provided into a general module as opposed to the vba specifically associated with frmLocation?

    And sorry. I think I see where the code does call txtCity_AfterUpdate

    And sorry. By "does not work" I mean that the txtState is still not being filled in. I do not get any error message. It is as though the code is not recognize txtCity is being called.

    [Event Procedure] is still present.

  3. #33
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    No. The code goes behind the form. As I said, all I did was modify the procedures you already had in the db you uploaded and it all works. (Except I did set the state label visible) Suggest if you are not using the same db, then do so to replicate results.

    I was merely describing what a general module is and how to create and how to run the debugger.
    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. #34
    zashaikh is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    182
    It worked! The problem was I wrote one of the names of the fields incorrectly. But everything is fine now. Thank you so very much for all of your help!

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Sum from part of a field?
    By ballaterach in forum Reports
    Replies: 3
    Last Post: 08-15-2016, 03:27 PM
  2. Replies: 1
    Last Post: 05-27-2015, 08:57 AM
  3. Part of field matches part of another field
    By fishhead in forum Queries
    Replies: 13
    Last Post: 04-10-2015, 01:54 PM
  4. Query Part of a Field
    By EHittner in forum Queries
    Replies: 1
    Last Post: 01-31-2015, 07:28 PM
  5. Query any part of the field
    By spleewars in forum Queries
    Replies: 1
    Last Post: 05-31-2012, 07:13 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