Computer Learning Zone CLZ Access Excel Word Windows

Keep away from people who try to belittle your ambitions. Small people always do that, but the really great make you feel that you, too, can become great.

-Mark Twain
 
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Access >
TechHelp


Back to TechHelp
 

Copying A Field Upload Images   Link  
Richard Van Wagoner 
22 days ago
I am trying to copy the math result off of a subform to the parent form. I can't seem to just copy it. Maybe you could point me in the right direction. I am on Expert level 14 lesson 3 with my courses. If this is covered in future lessons could you tell me which one?
Kevin Robertson
22 days ago
What have you tried to copy the value?
Richard Van Wagoner
22 days ago

Richard Van Wagoner
22 days ago
I tried Forms![ProductTotal]! procedure. I have tried Dlookup.
Kevin Robertson
22 days ago
In the Control Source of the field on the Parent form use this syntax:
=[SubformName]![FieldName]

Example:
=[OrderDetailF]![SumExtPrice]
Richard Van Wagoner
22 days ago
That is just what I wanted! Thank you!
Kevin Robertson
22 days ago
You're welcome.
Richard Van Wagoner
22 days ago
Just one more question on this subject. I am generating a report on this form. I can't seem to move that field to my report and make it work. Any suggestions? By the way, I'll tip you as soon as I am set up on Paypal.
Richard Van Wagoner
22 days ago
I was checking it is not putting the value in the table.
Kevin Robertson
22 days ago
Sorry. I didn't realise you were storing the value.
You could do something like this in the On Current Event of the parent form:

If Not IsNull(OrderID) Then
    OrderTotal = OrderDetailF.Form!SumExtPrice
    Me.Refresh
End If


Value From a Form
Richard Van Wagoner
22 days ago

Richard Van Wagoner
22 days ago

Richard Van Wagoner
22 days ago
I must not have things right.Is this supposed to be on the Parent form event  ON Current Tab?
Richard Van Wagoner
22 days ago
Parent Form is Named ProductF. Subform is ProductDetailF. And the total in subform is SupplySum.
Kevin Robertson
22 days ago
The code needs to go in the OnCurrent EVENT of the Parent form.
Open the Property Sheet for the Form and go to the Event tab.
Click on the Builder button (see screenshot).
Kevin Robertson
22 days ago

Richard Van Wagoner
22 days ago
I am sorry to keep bothering you. But that is where I put it. Do I have my forms named right in the event?
Richard Van Wagoner
22 days ago

Richard Van Wagoner
22 days ago

Richard Van Wagoner
22 days ago
This is the error message I get when opening the product form.
Kevin Robertson
22 days ago
Remove the code from there and click on the builder button (...) at the right. If you get the Choose Builder dialog, choose 'Code Builder' to open the Visual Basic Code Editor. This is where you need to enter the code.

Did you watch the On Current Event video?
Also: Intro to VBA.
Richard Van Wagoner
22 days ago
I haven't got that far into the lessons. Is the builder button on Parent form properties?
Kevin Robertson
22 days ago
Yes. See the screenshot I posted above. With the red square.
Richard Van Wagoner
22 days ago

Richard Van Wagoner
22 days ago

Richard Van Wagoner
22 days ago
This is the error message I get now when opening the parent Form. I have also included a screen shot of where I put the code.
Kevin Robertson
22 days ago
That's the Expression Builder. You need the Code Builder.
Kevin Robertson
22 days ago

Kevin Robertson
22 days ago

Richard Van Wagoner
22 days ago
I am not getting the chance to Choose the Builder That option is not displaying for me. I am clicking on the 3 dot on the right but all that comes up is the expression builder.
Richard Van Wagoner
22 days ago

Richard Van Wagoner
22 days ago
Is this the right place?
Kevin Robertson
22 days ago
Did you remove all the code you entered previously?
Kevin Robertson
22 days ago
Yes. Now enter the code between the Private Sub and End Sub.
Richard Van Wagoner
22 days ago
Yes, I removed it. Now I will put it in the right place. I have bothered you enough tonight, whether this works or not I will leave it as is till another day. Thank you so much!
Scott Axton
21 days ago
Richard  -
In the picture I'm looking at it appears that you are trying to put your code directly into the property sheet instead of the code module associated with the form you are working with.
That is the reason you are getting the error.

So...
Try this:
1. Copy that code in the zoom box and paste it into Note Pad to save it temporarily.  Close the Zoom Box.
2. Now click in the blank "cell" to the right of On Load.  Press the Up Arrow on your keyboard once.  It should highlight the contents in the on On Current line.  Press the Delete key.
3. Now that we are sure that everything is out of the On Current, you should be able to click the   ...   button and it should bring up the Choose Builder dialog box.  Click Code Builder then click OK.

Follow Kevin's instructions from there using the code you pasted in the Note Pad.
Richard Van Wagoner
21 days ago
I tried what you said and still an error. see images.
Richard Van Wagoner
21 days ago

Richard Van Wagoner
21 days ago

Richard Van Wagoner
21 days ago

Kevin Robertson
21 days ago
Check the name of your Subform object.
Richard Van Wagoner
21 days ago
Here is a screenshot of what I have
Richard Van Wagoner
21 days ago

Richard Van Wagoner
21 days ago
I saw one problem with SubformID, so I changed it. Now I get this error message. I did watch the Intro to VBA video last night and the extended cut video. I have a little better understanding of what is going on now.
Richard Van Wagoner
21 days ago

Add a ReplyUpload an Image


Back to TechHelp Comments
 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to TechHelp
Get notifications when this page is updated
 
 
 
 

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
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
amicron@gmail.com
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn