ShortellP
asked on
How do I enter and then propagate form field to its subform records (continuous form mode)
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!t xtState
End If
End Sub
I changed Me.txtState to Me.strPO# and Form_frmMainFormNameHere't xtState to Form_frmEnterPO#"NewPO# but all I get is an error about Must be collection.
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!t
End If
End Sub
I changed Me.txtState to Me.strPO# and Form_frmMainFormNameHere't
ASKER
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many thanks for pointing me to the right track on this.
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!POtextb