Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: One form to another

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

One form to another
Paul Dennis 01.09.2006 14:20:03
I have a form which lists all the records in a table. What I would like to do
is to be able to select 1 record or double click it or something which would
then open up another form just with that one record for edit.

Is this possible? and how?
Re: One form to another
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> 01.09.2006 14:37:07
The easiest method I know of is to add a command button in the detail
section of the continuous form that opens your new form based on the value
in the continuous form. Then find the double-click event of a control on
your main form and view its Event Procedure. Copy the code from the command
button into the On Double-Click event.

Once this is successful, you can delete the command button and the code for
the command button.

--
Duane Hookom
MS Access MVP

"Paul Dennis" <PaulDennis[ at ]discussions.microsoft.com> wrote in message
news:E245D0DA-B6D4-4DC5-9F17-320908414700[ at ]microsoft.com...
[Quoted Text]
>I have a form which lists all the records in a table. What I would like to
>do
> is to be able to select 1 record or double click it or something which
> would
> then open up another form just with that one record for edit.
>
> Is this possible? and how?


Re: One form to another
Paul Dennis 02.09.2006 15:51:02
What would the code be to open the form based on the value. Can you give me
an example?

"Duane Hookom" wrote:

[Quoted Text]
> The easiest method I know of is to add a command button in the detail
> section of the continuous form that opens your new form based on the value
> in the continuous form. Then find the double-click event of a control on
> your main form and view its Event Procedure. Copy the code from the command
> button into the On Double-Click event.
>
> Once this is successful, you can delete the command button and the code for
> the command button.
>
> --
> Duane Hookom
> MS Access MVP
>
> "Paul Dennis" <PaulDennis[ at ]discussions.microsoft.com> wrote in message
> news:E245D0DA-B6D4-4DC5-9F17-320908414700[ at ]microsoft.com...
> >I have a form which lists all the records in a table. What I would like to
> >do
> > is to be able to select 1 record or double click it or something which
> > would
> > then open up another form just with that one record for edit.
> >
> > Is this possible? and how?
>
>
>
Re: One form to another
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> 02.09.2006 19:34:18
Dim strWhere as String
Dim strFormName as String
strWhere = "[IdField]=" & Me.txtIdField
strFormName ="frmDetailRecord"
DoCmd.OpenForm strFormName, acNormal, , strWhere

If your IDField is text, you would need to use:
strWhere = "[IdField]=""" & Me.txtIdField & """"

--
Duane Hookom
MS Access MVP

"Paul Dennis" <PaulDennis[ at ]discussions.microsoft.com> wrote in message
news:CE17936E-9828-4211-A86A-11CEA0EE2D25[ at ]microsoft.com...
[Quoted Text]
> What would the code be to open the form based on the value. Can you give
> me
> an example?
>
> "Duane Hookom" wrote:
>
>> The easiest method I know of is to add a command button in the detail
>> section of the continuous form that opens your new form based on the
>> value
>> in the continuous form. Then find the double-click event of a control on
>> your main form and view its Event Procedure. Copy the code from the
>> command
>> button into the On Double-Click event.
>>
>> Once this is successful, you can delete the command button and the code
>> for
>> the command button.
>>
>> --
>> Duane Hookom
>> MS Access MVP
>>
>> "Paul Dennis" <PaulDennis[ at ]discussions.microsoft.com> wrote in message
>> news:E245D0DA-B6D4-4DC5-9F17-320908414700[ at ]microsoft.com...
>> >I have a form which lists all the records in a table. What I would like
>> >to
>> >do
>> > is to be able to select 1 record or double click it or something which
>> > would
>> > then open up another form just with that one record for edit.
>> >
>> > Is this possible? and how?
>>
>>
>>


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