Re: 2 Forms Updating 1 Table
From: Angeline (Angeline_at_discussions.microsoft.com)
Date: 12/30/04
- Next message: Angeline: "Re: 2 Forms Updating 1 Table"
- Previous message: Wayne Morgan: "Re: why doesn't input mask in table carry to forms?"
- In reply to: Wayne Morgan: "Re: 2 Forms Updating 1 Table"
- Next in thread: Angeline: "Re: 2 Forms Updating 1 Table"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Dec 2004 18:55:01 -0800
Wayne,
Thank you very much for that response. The problem however is that I am
creating a new record each time I update the form, or that is what I hope to
do. Does this mean it is not possible?
"Wayne Morgan" wrote:
> To do this, the record you are "updating" has to already exist. You can't be
> creating a new record. Next, in the DoCmd.OpenForm command there is an
> option to pass a filter.
>
> DoCmd.OpenForm(FormName, View, FilterName, WhereCondition, DataMode,
> WindowMode, OpenArgs)
>
> The WhereCondition argument is the one you are after. Pass the unique ID
> field of the record in this argument.
>
> Example:
> "IDField=" & Me.txtID
> if the value is a string instead of a number
> "IDField='" & Me.txtID & "'"
>
> Another option is to pass this value in the OpenArgs argument, then in the
> Load event of the second form, use this argument to move to the desired
> record. The OpenArgs argument accepts a string value, so you may have to
> pass the value as a string, even if it is a number, then convert it back in
> the second form.
>
> Example:
> Me.Recordset.FindFirst "IDField=" & CLng(Me.OpenArgs)
>
> --
> Wayne Morgan
> MS Access MVP
>
>
> "Angeline" <Angeline@discussions.microsoft.com> wrote in message
> news:18C1116D-1798-4FDB-96A8-66313998DB71@microsoft.com...
> >I am buidling two forms (form1 and form2). They both update the same table
> > but form2 is activated (via a macro) from form1 when a particular field is
> > populated. My problem is that I cannot get form 2 (when activated) to
> > open
> > up at the same record as what is being updated in form1. It defaults back
> > to
> > the first record in the table and I need it to open up at the current
> > record
> > I was updating in form1. I'd really appreciate some help.
>
>
>
- Next message: Angeline: "Re: 2 Forms Updating 1 Table"
- Previous message: Wayne Morgan: "Re: why doesn't input mask in table carry to forms?"
- In reply to: Wayne Morgan: "Re: 2 Forms Updating 1 Table"
- Next in thread: Angeline: "Re: 2 Forms Updating 1 Table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|