Results 1 to 5 of 5

Dual listboxes... need to replicate form with listboxes but copy results in VBA error

  1. #1
    skydivetom is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    222

    Dual listboxes... need to replicate form with listboxes but copy results in VBA error

    Experts:

    I need some assistance with reviewing VBA and/or queries which currently result in a VBA error.



    Background:
    - Attached database contains several tables, queries, and two forms.
    - Form "F50_BilletsToWorkingGroups" works great and allows me to add "billets to working groups".
    - Once the form opens, I can assign billets/jobs to working groups A, B, C.
    - Depending on the billet selection for each of the three working groups, the foreign keys are added to table "T10_JunctionTable_BWG".
    - This process works flawlessly.

    Additional Information:
    - I need to replicate the same process for "billets to UJTLs" (never mind what UJTL stands for).
    - So, I copied tables T10_JunctionTable_BWG and T11_WorkingGroups and named them T20_JunctionTable_BUJTL and T21_UJTL, respectively.
    - I then populated some UJTLs (UniversalJointTaskList) into table T21_UJTL.

    Reference Replacements:
    - I went through a meticulous find/replace process (in ASCII program) and replaced any, e.g., "working group" references with, e.g., "UJTL".
    - Below values were used to replace WG-related terms:

    Code:
    [T21_UJTL]
    UJTLIDpk
    UniversalJointTaskList
    
    [T20_JunctionTable_BUJTL]
    UJTLIDfk
    BilletIDfk
    
    F51_BilletsToUJTL
    Queries:
    - I replaced any of the working group references in all three queries (Q51A_BilletsToUJTL; Q51B_BilletsToUJTL; Q51C_BilletsToUJTL).
    - For testing purposes, I then executed and compared results between, e.g., "Q50A_BilletsToWorkingGroups" and "Q51A_BilletsToUJTL".
    - The query structures (in design view) appear to the same and the queries also returned UJTL-related info vs. WG-related info.
    - So far so good (I believe)... now onto the form... and this is where I need some help with.

    Form:
    - I copied form "F50_BilletsToWorkingGroups" and then named it "F51_BilletsToUJTL".
    - Afterwards, I again went through the find/replace for (I believe) all WG-related references to UJTL references.
    - I did this for the following:
    * Drop-down combo data source;
    * Drop-down event (and all associated VBA)
    * Query reference in left listbox
    * SQL update in right listbox

    Ultimately, I did this whole "thing" twice and twice am I ending up with the same VBA error when opening the form "F51_BilletsToUJTL".

    My question:
    What am I still missing which prevents "F51_BilletsToUJTL" to work in the same fashion as form "F50_BilletsToWorkingGroups"?

    Any specific references would be truly appreciated!!

    Thank you in advance,
    EEH
    Attached Files Attached Files

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    6,103
    I need some assistance with reviewing VBA and/or queries which currently result in a VBA error.
    It may be obvious if you had specified what the error message is, rather than having to download, unzip into a new folder - only to get an error that may be a result of doing all that but one that has nothing to do with your problem. So what's the message & number?
    - "doesn't work" is no help. Post err msgs and where.
    - Use code tags for code/sql. Implement changes in copies of your database.
    (humor about talking to yourself apparently was too much for some)

  3. #3
    skydivetom is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    222
    Please see error below:
    Attached Thumbnails Attached Thumbnails VBA error.JPG  

  4. #4
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    308
    UJTLIDpk is not in the recordsource of the form.

  5. #5
    skydivetom is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    222
    moke123... I looked at everything but the form's record source.

    Perfect... it works fine now. Thank you for your help!!!

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

Similar Threads

  1. Dual listboxes ... need to tweak VBA or query
    By skydivetom in forum Forms
    Replies: 3
    Last Post: 08-08-2019, 04:36 PM
  2. Replies: 20
    Last Post: 08-03-2019, 03:21 AM
  3. Filter Split Form using listboxes
    By Delta729 in forum Access
    Replies: 2
    Last Post: 01-06-2015, 10:59 PM
  4. Multiple Listboxes in Search Form
    By cbrsix in forum Programming
    Replies: 6
    Last Post: 05-03-2013, 12:11 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
  •  
Tech Forums: Microsoft Office Forums