Solved

How do I enter and then propagate form field to its subform records (continuous form mode)

Posted on 2008-10-05
4
171 Views
Last Modified: 2013-11-28
I have a form in which I want to be able to enter a PO# and then have that PO# Propagate into all records of a subform which is in continous form mode and is based on a query that has returned all the records that need the PO update.
I tried using the code example from an already posted response to another members question on how to do something like this.  The code offered was:
Private Sub Form_Current()
    If Me.NewRecord Then
        Me.txtState = Form_frmMainFormNameHere!txtState
    End If
End Sub
I changed Me.txtState to Me.strPO# and Form_frmMainFormNameHere'txtState to Form_frmEnterPO#"NewPO# but all I get is an error about Must be collection.
0
Comment
Question by:ShortellP
  • 2
  • 2
4 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 22648204
You should run an update query to set the PO number.
It sounds like the query will start as the one you currently use to display the records.
Create a copy of that and then convert it to an update query.
You can the specify the Update to value for the PO field using a reference to your form

UpdateTo:  Forms!mainformname!POtextboxname
0
 

Author Comment

by:ShortellP
ID: 22659275
I think I understand and will try this out later today.
I will use the original querry to bring up the form and then have a command button that kicks off the Update Query once the PO# is filled in. If that is NOT what you mean. please let me know.
Thanks for the quick and easy to follow response.
0
 
LVL 77

Accepted Solution

by:
peter57r earned 125 total points
ID: 22659734
That's fine.
If you have any problems post back.
0
 

Author Closing Comment

by:ShortellP
ID: 31503251
Many thanks for pointing me to the right track on this.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now