me.form.field.value =

WarriorMCB

Registered User.
Local time
Today, 17:29
Joined
Jul 20, 2004
Messages
27
Hello,

I am trying to send data from one form to another to a certain field an afterupdate VBA, and it send it just fine. However the trouble is when field 2 has the same formula (though it's going to a new field in the said form) it goes to a new record, which is not what I need it to do. I wanting it to goto a different field in the same record. How is this done, I have no idea. Please I need your help in thias matter. Hopefully I worded it right.
Thank you
 
Hi. I'm sure all that make sense to you, but we can't see your form or VBA, so I am having a hard time understanding your question. Can you please elaborate a bit more? Thanks!
 
Private Sub LSDate_AfterUpdate()
Me.Child143.Form.Sold_Date.Value = [LSDate]
Me.Child143.Form.SBWK.Value = DatePart("ww", [LSDate])
End Sub

Private Sub PlayDate_Pcs_AfterUpdate()
Me.Child143.Form.Amount_Sold.Value = [Total Pcs]
End Sub

So, LSDate works fine and the said values go where they meant to be.
When PlayDate afterupdate activates, it sends the value data to a new record, which is not what I need it to do. I need it to go to the same record to the said field.
 
From what you showed us, that doesn't immediately look like something this code is doing. Is there some other code segment in another event somewhere, perhaps in a BeforeUpdate event? OR is there an autonumber field bound into the parent form that somehow involves the child form?
 
This is kind of a shot in the dark, but ... is [Total Pcs] the name of a control (like a textbox) and also the name of an underlying (form's Recordsource) column/field ?
 
@ Isaac. It's a fieldname.
Anyways upon further data inputs it only shares data from same record over and over again. sigh, not what I want. I'm trying to save myself from double entering the data when it's available on another form. Oh well.
 
Good Day
>rather call a form with that desired fields/row=ID, to hit the target fields for fill-up/update
 
you can also use BeforeUpdate event:

Private Sub LSDate_BeforeUpdate()
Me.Child143!Sold_Date = [LSDate]
Me.Child143!SBWK = DatePart("ww", [LSDate])
End Sub

Private Sub PlayDate_Pcs_BeforeUpdate()
Me.Child143!Amount_Sold = [Total Pcs]
End Sub
 
@ Isaac. It's a fieldname.
Anyways upon further data inputs it only shares data from same record over and over again. sigh, not what I want. I'm trying to save myself from double entering the data when it's available on another form. Oh well.
I thought (and still think) it might be connected to how you're referring to a "fieldname" (meaning a column in the form's Recordsource I presume?) vs. a textbox or other control...or worse yet if they are named the same.
 
I'm trying to save myself from double entering the data when it's available on another form
The same data should not be stored in multiple tables. My suggestion is to step away from the computer and rethink your table schema. There is something very wrong with the process if it requires the same data to be entered into multiple tables at the same time.
 

Users who are viewing this thread

Back
Top Bottom