Results 1 to 5 of 5
  1. #1
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038

    Listbox

    Experts:

    I need some help w/ locating a required fieldname update for a database using two listboxes.

    Background:
    - Attached are two (2) databases. v02 is a replica of v01 except I changed only one fieldname.
    - v01 works great; however, given the change of the fieldname (i.e., from v01's [TeamIDpk] in table "00_tblEvent" to v02's [EventIDpk] in table "00_tblEvent"), the form "frmEventAssignments" results now in an error upon opening.
    - The data is 100% arbitary (i.e., actor's names and event names).

    Process (in v01):
    - Open the form
    - Select any of the three events from the drop-down menu
    - Use the listboxes to assign/remove names from the events

    Changes I made:
    - Again, v01 works great but has the fieldname referencing "TeamIDpk" throughout the database. That is inconsistent given that I'm assigning members to events (not teams).
    - Thus, in v02 I used the "Find & Replace" to replace any instance -- well, I should say I believe I replaced any instance equal to "TeamIDpk" with "EventIDpk" -- through all objects (tables, queries, forms, combo box, list boxes, as well as the VBA).

    Dilemma:
    - I have tried updating v02 multiple times... each time, however, I end up w/ the same error indicating a "Compile Error - Method or data member not found".
    - Each time I ended up going back to v01 and replicated into v02 and then and changed all instances of "TeamIDpk" with "EventIDpk". Yet, each time, I come up w/ the same error when opening the form.

    Does anyone know what's the missing (hidden) property which still requires an update to "TeamIDpk" and thus needs to be changed to "EventIDpk"?

    Thank you,
    EEH
    Attached Files Attached Files

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,406
    Everywhere in the code you have Me.EventIDpk, change it to [EventIDpk].

  3. #3
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    davegri:

    Thank you for the reply...

    I replaced the instances in the VBA... I still get the same error though. Did it work for you? If so, could you pls post your version (or VBA)?

    Also, how come it's working fine in v01 (w/o making the VBA change)?

    Thank you in advance,
    EEH

  4. #4
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,406
    Listbox -- Events davegri v02.mdb
    This works for me in 32 bit Access.
    The ME. prefix refers to a control on the form. There is no control on the form named TeamIDpk or EventIDpk, so I don't know how it works in one but not the other This has always been an error in my recollection. Maybe has something to do with early .mdb files.
    The brackets let the reference see the data name in the form recordsource.
    Last edited by davegri; 06-24-2019 at 04:11 PM. Reason: sp

  5. #5
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Davegri:

    Perfect!! I did NOT add the brackets [] when replacing Me.EventIDpk to [EventIDpk]. You included them... I overlooked them.

    Again, thank you for helping me out. I really appreciate it.

    Thanks,
    EEH

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

Similar Threads

  1. Replies: 1
    Last Post: 01-31-2015, 09:03 PM
  2. Replies: 2
    Last Post: 03-23-2014, 06:50 AM
  3. Replies: 3
    Last Post: 12-13-2012, 04:40 AM
  4. Replies: 1
    Last Post: 09-10-2012, 11:21 PM
  5. Replies: 1
    Last Post: 07-26-2012, 11:45 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