Group:  Microsoft Access » microsoft.public.access.formscoding
Thread: Updating Field Value In Another Form

Geek News

Updating Field Value In Another Form
rama <chanattu[ at ]gmail.com> 11/16/2008 7:53:25 PM
Hello,
In my database there is a unbound main form and a subform (Datasheet
view) which is bound to a table, for data entry purpose. On double
click event of “txtID” (Auto number) field in subform will open
another form called FRM_Memo to put more detailed description. What I
wish to do is to update the txtID field value in FRM_Memo txtRef field
automatically while opening FRM_Memo. Please help me to work out this.
Many Thanks in advance.
Rama
Re: Updating Field Value In Another Form
"Linq Adams via AccessMonster.com" <u28780[ at ]uwe> 11/16/2008 10:05:04 PM
There's several ways to do this, but if I understand your post, this should
do the trick.

In your calling subform:

Private Sub txtID_DblClick(Cancel As Integer)
DoCmd.OpenForm "FRM_Memo", , , , , , Me.txtID
End Sub

Then, in FRM_Memo :

Private Sub Form_Load()
If Len(Nz(Me.OpenArgs, "")) > 0 Then
DoCmd.GoToRecord , , acNewRec
Me.txtRef = Me.OpenArgs
End If
End Sub


rama wrote:
[Quoted Text]
>Hello,
>In my database there is a unbound main form and a subform (Datasheet
>view) which is bound to a table, for data entry purpose. On double
>click event of “txtID” (Auto number) field in subform will open
>another form called FRM_Memo to put more detailed description. What I
>wish to do is to update the txtID field value in FRM_Memo txtRef field
>automatically while opening FRM_Memo. Please help me to work out this.
>Many Thanks in advance.
>Rama

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1

Re: Updating Field Value In Another Form
Rob 11/24/2008 10:04:11 PM
Hello,

I have somewhat of a similar problem. I have a form and subform. On the
subform I have a sum that adds up all of a specific field. I want that total
to transfer back to the main form and be stored in a bound field. Is this
possible and how. Right now I am running code when the main form closes that
opens a recordset for the main table and looks for grouped sum of the key
field in the sub forms' table. Any suggestions would be greatly appreciated.

Regards,

Rob

"Linq Adams via AccessMonster.com" wrote:

[Quoted Text]
> There's several ways to do this, but if I understand your post, this should
> do the trick.
>
> In your calling subform:
>
> Private Sub txtID_DblClick(Cancel As Integer)
> DoCmd.OpenForm "FRM_Memo", , , , , , Me.txtID
> End Sub
>
> Then, in FRM_Memo :
>
> Private Sub Form_Load()
> If Len(Nz(Me.OpenArgs, "")) > 0 Then
> DoCmd.GoToRecord , , acNewRec
> Me.txtRef = Me.OpenArgs
> End If
> End Sub
>
>
> rama wrote:
> >Hello,
> >In my database there is a unbound main form and a subform (Datasheet
> >view) which is bound to a table, for data entry purpose. On double
> >click event of “txtID” (Auto number) field in subform will open
> >another form called FRM_Memo to put more detailed description. What I
> >wish to do is to update the txtID field value in FRM_Memo txtRef field
> >automatically while opening FRM_Memo. Please help me to work out this.
> >Many Thanks in advance.
> >Rama
>
> --
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000/2003
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net