?
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
?
193 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

649 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