Results 1 to 15 of 15
  1. #1
    Santonin is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2018
    Location
    USA
    Posts
    18

    Command Button wizard doesn't display fields from both tables.

    Hi all. I recently upgraded from Access 2003 to Access 2007 and I've run into an odd problem with the Command Button wizard. I know that the Command Button wizard defaults to creating embedded macros instead of event procedures, even if the option is set to always use event procedures, but that isn't the problem.




    The Problem: I want to use the command button wizard to create a button that opens a form and finds specific data to display (a routine function), but when I get to the point in the wizard where it asks me to specify which fields contain the matching data, the right side pane is populated properly with the fields from the table containing the foreign key (tblExpenses), but the left side pane which is supposed to be populated with all the fields from the table which contains the primary key (tblPlaces) is completely empty, so it isn't possible to actually select the fields with the matching data and go on to finish the wizard.


    Workaround: I've already solved this problem by abandoning the stupid wizard and writing the VBA code myself to get the job done (the same code generated by the wizard in Access 2003), so the button is already working as it should. But I still have no idea why the left side pane in the button wizard didn't show any fields as it should have.


    I searched this and found where another user asked about the exact same problem. The advice there was to use VBA instead of the wizard, but again - that advice doesn't explain why the left side pane in the wizard was empty. My forms are bound to the underlying tables, so the problem is not being caused by the use of unbound fields. The fact that routine VBA code solved the problem, and the fact that the subdatasheet in the primary table shows the correct filtered data in the related table both prove that the tables and relationships are set up and functioning properly. Also, I've long since been to the Trust Center and done the necessaries there, including subfolders.


    So, does anyone here know why the left side pane in the command button wizard would be empty rather than showing a list of fields as it should? I like a good brain teaser, but I'm getting a headache. Hopefully I've supplied all the needed information for someone to be able to recognize the problem and answer this.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,920
    I never use the wizards so just gave this a try. When I get to the 'select fields' screen, both panes are populated with fields. The left has fields from form with the button and right has fields from the form I want to open filtered. And these two tables don't have relationship.

    If you want to provide db for analysis, follow 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.

  3. #3
    Santonin is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2018
    Location
    USA
    Posts
    18
    Hi June7. I remember you from the other two times I was here. Glad you're still around. It seems odd to me that you aren't having the problem. You did use Access 2007 right? I just noticed that my profile still says I'm using 2003, so I thought I should ask. The only difference I can see in what you said is that my two tables ARE related - One to Many with referential integrity set. So rather than remove the confidential data (lots), I'll just recreate the two related tables and the two forms with only the fields needed to demonstrate the problem, and I'll post it tomorrow when I get back from running errands. But for now, thanks for helping out again.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,920
    No, I am using Access 2010 but I would expect same behavior with 2007.
    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.

  5. #5
    Santonin is offline Novice
    Windows 10 Access 2003
    Join Date
    Dec 2018
    Location
    USA
    Posts
    18
    Ok, after a few hours sleep I figured out the right way to do this. I imported the tables and forms w/o the data into a test database and tried to put a command button on the Places form. Same problem. So I zipped it up and hopefully I was successful in figuring out how to attach it. So far it looks like I was. But I don't have Access 2010, and I can't get Access 2010 (for free), so if you use Access 2010 and you don't see the problem when you try to create a new command button using the wizard, then as far as I'm concerned Access 2007 is bugged. It isn't my computer because the same thing happens on an Asus ROG and an MSI, both new-ish and fully up to date. Anyway, thanks again for taking the time to at least have a look. Hopefully you see something I don't.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,920
    I get both boxes populated with fields.
    Click image for larger version. 

Name:	Capture.JPG 
Views:	18 
Size:	69.6 KB 
ID:	46838

    Sorry, can't provide a solution.

    You might want to edit your profile.

    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.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    I have 2007, but you will need to give me what steps I need to take?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #8
    Santonin is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2018
    Location
    USA
    Posts
    18
    Ok thanks anyway June7. I appreciate you having a look. Sure wish I could get your result. I edited my profile earlier this morning.

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    On 2007 and Windows 10 Pro
    Click image for larger version. 

Name:	Capture.PNG 
Views:	18 
Size:	18.5 KB 
ID:	46839
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    Santonin is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2018
    Location
    USA
    Posts
    18
    Hi Welsh,
    Thanks for stepping in. All you need to do is unzip the database, open it, load frmPlaces in design view, and drop a command button on the form with wizards active and try to set up the button to open frmExpenses and find specific data to display. When you get to the part where you have to select the fields with matching data, I only see fields in the right side pane like the right side pane in the image posted by June7. Unlike his image, the left side pane is empty on my computer, so I can't select a matching field. If your copy of Access 2007 actually does show fields on both sides, then I have no alternative but to assume that something is wrong with my copy of Access, and I have no idea what it could be. But at least it will be pinned down and I'll know that I need to get another version of the database - 2010 next.

  11. #11
    Santonin is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2018
    Location
    USA
    Posts
    18
    Wow. Seeing is believing. Thanks very much Welsh. Between you and June7, this is now pinned down to something being wrong with my copy of Access. Clearly nothing is wrong with anything I did or it would have shown up at your end also. If I knew how to create those images like you and June7 did, I could have posted one and saved myself a lot of words. Do you take a screen shot somehow and then use an image editor to get that image so perfect? And how do I credit both you and June7 for helping pin this down?

  12. #12
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    Just use the windows snipping tool
    Try an office repair?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  13. #13
    Santonin is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2018
    Location
    USA
    Posts
    18
    Office repair? Don't know about it. But I did play around with the image capture thing and figured it out. So my first attempt at placing an image of my results here...did ok. So now you can see the problem for yourselves.

    Click image for larger version. 

Name:	ScreenCap.jpg 
Views:	15 
Size:	22.7 KB 
ID:	46841

  14. #14
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    Go into Apps and Click on the program.Then Modify, then Repair when the setup starts up and shows a dialogue.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  15. #15
    Santonin is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2018
    Location
    USA
    Posts
    18
    Ok I did that, but it didn't help. I still get the same result as above. I'm reasonably convinced that my copy of Office 2007 Enterprise Edition is corrupted or something, and by repairing, it only reinstalls the problematic copy of itself. So I'm going to go back to the shop where I got my copy of Office 2007 Enterprise edition and see if I can get my hands on a different copy of Office 2007, or maybe even Office 2010. Nuking the problem like that should kill it.

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

Similar Threads

  1. Button wizard doesn't work.
    By Ed Mattison in forum Forms
    Replies: 8
    Last Post: 09-07-2016, 07:25 AM
  2. Replies: 3
    Last Post: 08-04-2013, 07:11 AM
  3. Error on command button wizard
    By jcor in forum Forms
    Replies: 7
    Last Post: 05-10-2013, 09:34 AM
  4. Command Button Wizard and Matching Fields
    By tylerg11 in forum Forms
    Replies: 5
    Last Post: 10-07-2011, 01:07 PM
  5. Command Button Wizard
    By cscobba in forum Forms
    Replies: 7
    Last Post: 01-26-2011, 04:43 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