Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
code for sub sub forms
Tim Elbert 
      
2 years ago
I am still working on product labels for sold items.  I am getting closer to what I want but I need a little help with code.  
I have made a label and a button for opening the label as Mr Rost taught in the label seminar.  I added it to the customerF and added the code as he taught.  Things were working fine.  I realized that what I really needed was to make labels for each line item in the order.  This is in my OrderDetailSubF inside the OrderF which is inside the CustomerF.  I moved the 'Make Labels' button inside the OrderDetailSubF so I could choose and print labels for each line item.  I am missing something in the code however  and it is not working. Please see photos.
Could someone please help me whith how to set up the code for this?  I am sure there is something simple I am doing wrong.
Thanks,
Tim Elbert OP  @Reply  
      
2 years ago

Tim Elbert OP  @Reply  
      
2 years ago

Sami Shamma  @Reply  
             
2 years ago
Oh Tim

you make our friend Alex very unhappy. You did not name your buttons, and it is therefore difficult to figuer out what the code is doing.

When it gives you the error, hover over the parts of the Yellow code, and it will show you the values. that may give you a clue.
Tim Elbert OP  @Reply  
      
2 years ago

Tim Elbert OP  @Reply  
      
2 years ago
Thank you Sami.  I will get that fixed.  If I hover over the last part:  CustomerF!OrderF!OrderId it says:  
CustomerF!OrderF!OrderId =<Object required>
Tim Elbert OP  @Reply  
      
2 years ago

Tim Elbert OP  @Reply  
      
2 years ago
Sami
I fixed the issue with the unnamed buttons :)
Alex Hedley  @Reply  
           
2 years ago
Have you missed off the Forms!?
Tim Elbert OP  @Reply  
      
2 years ago
Hi Alex
I added Forms! to the syntax and it didn't seem to help.  I realized I am also getting a "Forms!SoldLabelF!Line1=NULL" when I hover over the beginning of the line.
Tim Elbert OP  @Reply  
      
2 years ago
Update:  I realized I had the orderF openwithiut the customerF.  When I opened the CustomerF all is well.  Adding Forms! helped, thanks Alex.
Alex Hedley  @Reply  
           
2 years ago
Did you mention something about a SubForm?

You probably need to update the ref like in Value From a Form
Tim Elbert OP  @Reply  
      
2 years ago
One more issue - how do I get a checkbox to return "YES" instead of "-1" using the code?
Code is as follows:
Forms!SoldLabelF!Line4 = HasHardware & IsPaid
I want the "true" value to display YES.  Do I format it the same way I would in a query (IIF)?
Bill Swan  @Reply  
    
2 years ago
It might be ... IIf(Me.IsPaid = -1, "YES", "NO")
Kevin Robertson  @Reply  
          
2 years ago
Bill,

I would write the function like this:

    IIf(IsPaid, "YES", "NO")

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

Next Unseen

 
New Feature: Comment Live View
 
 

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: 5/7/2026 4:36:54 PM. PLT: 0s