?
Solved

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

Posted on 2008-10-05
4
Medium Priority
?
189 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

764 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