Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > Courses > Access > Expert > X08 > work around solution by Michael >
Back to Access Expert 8    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
work around solution
Michael 
    
12 years ago
Richard, as a work-around solution for the issue with the command button wizard problem that I ran into, I went into the Build Event property and changed the code.

For anyone that runs into this same issue, here's what I did:

I created a command button on the ProductSubF to open all records. This at least allowed me to get a working command button onto ProductSubF. Remember, I couldn't open specific records because the ProductSubF fields were not appearing in the left pane in the command button wizard.

I then accessed the code behind the command button throught the BuildEvent property.

I compared this code to the code for a working command button that would open a specific record on a form from a command button on a subform.

I deleted all of the code for the command button on the ProductSubF and brought over the working code for the other forms.

I made name and reference changes where needed. Here's the code:

Private Sub OpenSelectedProductButton_Click()
On Error GoTo Err_OpenSelectedProductButton_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "ProductF"
    stLinkCriteria = "[ProductID]=" & Me![ProductID]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_OpenSelectedProductButton_Click:
    Exit Sub

Err_OpenSelectedProductButton_Click:
    MsgBox Err.Description
    Resume Exit_OpenSelectedProductButton_Click

End Sub

I would still be interested to know why the fields aren't/weren't visible in the left pane of the command button wizard.

M.



Reply from Richard Rost:

This may work, but you shouldn't have had to do it. This is way beyond Expert 8 material, and I wouldn't have shown it in class if this was required. Something else went wrong while you were creating your button.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Expert 8.
 

Next Unseen

 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 10/11/2026 9:51:32 PM. PLT: 1s