Solved

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

Posted on 2008-10-05
4
181 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 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