Using subform value to open new form?

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I have a subform listing multiple records. I want to be
able to click on a record and have a new form open listing
the details. I tried running a macro(open form) when
clicking on the record, but I get a popup window asking
for the value then the form opens with the correct
window. I used the expression builder to set the where
condition. Any ideas?
 
Sounds as if the query that you're using as the RecordSource of the "popup"
form has a parameter in it that needs to be filled, and then you're also
using the WHERE argument of the OpenForm action to filter the form's
contents (records from the recordsource's query).

If you're using the WHERE argument in the OpenForm action, then likely you
can delete the parameter from the query (a parameter is anything for which
the query needs a value: could be [Enter a value:] or
[Forms]![FormName]![ControlName] or such).

If this doesn't help, post back with the popup form's query's SQL and the
specific macro actions that you're using, including the arguments.
 
I am not using a query to select data for the detail popup
form. On a subform listing all records, I click on the
record that I would like to see detail and execute a macro
(open form) with the where condition :
[Forms]![Locate Turn Id by Contact Person Sub Frm]!
[TurnId] Like [TurnId]

On the Sub form - Locate Turn Id by Contact Person Sub Frm
I have a field call TurnId, I want to click on the TurnId
and have it open a new form called TurnFrm that displays
the detail info about the TurnId. I get a popup asking
for ENTER PARAMETER VALUE... [Forms]![Locate Turn Id by
Contact Person Sub Frm]![TempTurnId]. If I enter the
turid number, the correct information is displayed. I've
tried reversing the Like statment and get the same result.

-----Original Message-----
Sounds as if the query that you're using as the RecordSource of the "popup"
form has a parameter in it that needs to be filled, and then you're also
using the WHERE argument of the OpenForm action to filter the form's
contents (records from the recordsource's query).

If you're using the WHERE argument in the OpenForm action, then likely you
can delete the parameter from the query (a parameter is anything for which
the query needs a value: could be [Enter a value:] or
[Forms]![FormName]![ControlName] or such).

If this doesn't help, post back with the popup form's query's SQL and the
specific macro actions that you're using, including the arguments.


--

Ken Snell
<MS ACCESS MVP>

I have a subform listing multiple records. I want to be
able to click on a record and have a new form open listing
the details. I tried running a macro(open form) when
clicking on the record, but I get a popup window asking
for the value then the form opens with the correct
window. I used the expression builder to set the where
condition. Any ideas?


.
 
Ah, but you are providing a parameter....in your WHERE statement.

Change the WHERE clause in the macro to this:

="[TurnId] Like '" & [TurnId] & "'"

--

Ken Snell
<MS ACCESS MVP>

Steve said:
I am not using a query to select data for the detail popup
form. On a subform listing all records, I click on the
record that I would like to see detail and execute a macro
(open form) with the where condition :
[Forms]![Locate Turn Id by Contact Person Sub Frm]!
[TurnId] Like [TurnId]

On the Sub form - Locate Turn Id by Contact Person Sub Frm
I have a field call TurnId, I want to click on the TurnId
and have it open a new form called TurnFrm that displays
the detail info about the TurnId. I get a popup asking
for ENTER PARAMETER VALUE... [Forms]![Locate Turn Id by
Contact Person Sub Frm]![TempTurnId]. If I enter the
turid number, the correct information is displayed. I've
tried reversing the Like statment and get the same result.

-----Original Message-----
Sounds as if the query that you're using as the RecordSource of the "popup"
form has a parameter in it that needs to be filled, and then you're also
using the WHERE argument of the OpenForm action to filter the form's
contents (records from the recordsource's query).

If you're using the WHERE argument in the OpenForm action, then likely you
can delete the parameter from the query (a parameter is anything for which
the query needs a value: could be [Enter a value:] or
[Forms]![FormName]![ControlName] or such).

If this doesn't help, post back with the popup form's query's SQL and the
specific macro actions that you're using, including the arguments.


--

Ken Snell
<MS ACCESS MVP>

I have a subform listing multiple records. I want to be
able to click on a record and have a new form open listing
the details. I tried running a macro(open form) when
clicking on the record, but I get a popup window asking
for the value then the form opens with the correct
window. I used the expression builder to set the where
condition. Any ideas?


.
 
Tried it, but I get an erron when I click on the TurnId in
the sub form.... DATA TYPE MISMATCH IN CRITERIA EXPRESSION


-----Original Message-----
Ah, but you are providing a parameter....in your WHERE statement.

Change the WHERE clause in the macro to this:

="[TurnId] Like '" & [TurnId] & "'"

--

Ken Snell
<MS ACCESS MVP>

I am not using a query to select data for the detail popup
form. On a subform listing all records, I click on the
record that I would like to see detail and execute a macro
(open form) with the where condition :
[Forms]![Locate Turn Id by Contact Person Sub Frm]!
[TurnId] Like [TurnId]

On the Sub form - Locate Turn Id by Contact Person Sub Frm
I have a field call TurnId, I want to click on the TurnId
and have it open a new form called TurnFrm that displays
the detail info about the TurnId. I get a popup asking
for ENTER PARAMETER VALUE... [Forms]![Locate Turn Id by
Contact Person Sub Frm]![TempTurnId]. If I enter the
turid number, the correct information is displayed. I've
tried reversing the Like statment and get the same result.

-----Original Message-----
Sounds as if the query that you're using as the RecordSource of the "popup"
form has a parameter in it that needs to be filled, and then you're also
using the WHERE argument of the OpenForm action to
filter
the form's
contents (records from the recordsource's query).

If you're using the WHERE argument in the OpenForm action, then likely you
can delete the parameter from the query (a parameter is anything for which
the query needs a value: could be [Enter a value:] or
[Forms]![FormName]![ControlName] or such).

If this doesn't help, post back with the popup form's query's SQL and the
specific macro actions that you're using, including the arguments.


--

Ken Snell
<MS ACCESS MVP>

I have a subform listing multiple records. I want to be
able to click on a record and have a new form open listing
the details. I tried running a macro(open form) when
clicking on the record, but I get a popup window asking
for the value then the form opens with the correct
window. I used the expression builder to set the where
condition. Any ideas?


.


.
 
TurnID must not be text formatted, then, right? Like is used only for text
formatted fields.

Try this:
="[TurnId] = " & [TurnId]

--

Ken Snell
<MS ACCESS MVP>


steve said:
Tried it, but I get an erron when I click on the TurnId in
the sub form.... DATA TYPE MISMATCH IN CRITERIA EXPRESSION


-----Original Message-----
Ah, but you are providing a parameter....in your WHERE statement.

Change the WHERE clause in the macro to this:

="[TurnId] Like '" & [TurnId] & "'"

--

Ken Snell
<MS ACCESS MVP>

I am not using a query to select data for the detail popup
form. On a subform listing all records, I click on the
record that I would like to see detail and execute a macro
(open form) with the where condition :
[Forms]![Locate Turn Id by Contact Person Sub Frm]!
[TurnId] Like [TurnId]

On the Sub form - Locate Turn Id by Contact Person Sub Frm
I have a field call TurnId, I want to click on the TurnId
and have it open a new form called TurnFrm that displays
the detail info about the TurnId. I get a popup asking
for ENTER PARAMETER VALUE... [Forms]![Locate Turn Id by
Contact Person Sub Frm]![TempTurnId]. If I enter the
turid number, the correct information is displayed. I've
tried reversing the Like statment and get the same result.


-----Original Message-----
Sounds as if the query that you're using as the
RecordSource of the "popup"
form has a parameter in it that needs to be filled, and
then you're also
using the WHERE argument of the OpenForm action to filter
the form's
contents (records from the recordsource's query).

If you're using the WHERE argument in the OpenForm
action, then likely you
can delete the parameter from the query (a parameter is
anything for which
the query needs a value: could be [Enter a value:] or
[Forms]![FormName]![ControlName] or such).

If this doesn't help, post back with the popup form's
query's SQL and the
specific macro actions that you're using, including the
arguments.


--

Ken Snell
<MS ACCESS MVP>

message
I have a subform listing multiple records. I want to be
able to click on a record and have a new form open
listing
the details. I tried running a macro(open form) when
clicking on the record, but I get a popup window asking
for the value then the form opens with the correct
window. I used the expression builder to set the where
condition. Any ideas?


.


.
 
Thank you...Thank you...Thank you...Thank you...This was
one of those things that has bugged the hell out of me and
I knew there was a simple solution. I could get it working
using a form, but not a subform.

-----Original Message-----
TurnID must not be text formatted, then, right? Like is used only for text
formatted fields.

Try this:
="[TurnId] = " & [TurnId]

--

Ken Snell
<MS ACCESS MVP>


Tried it, but I get an erron when I click on the TurnId in
the sub form.... DATA TYPE MISMATCH IN CRITERIA EXPRESSION


-----Original Message-----
Ah, but you are providing a parameter....in your WHERE statement.

Change the WHERE clause in the macro to this:

="[TurnId] Like '" & [TurnId] & "'"

--

Ken Snell
<MS ACCESS MVP>

I am not using a query to select data for the detail popup
form. On a subform listing all records, I click on the
record that I would like to see detail and execute a macro
(open form) with the where condition :
[Forms]![Locate Turn Id by Contact Person Sub Frm]!
[TurnId] Like [TurnId]

On the Sub form - Locate Turn Id by Contact Person
Sub
Frm
I have a field call TurnId, I want to click on the TurnId
and have it open a new form called TurnFrm that displays
the detail info about the TurnId. I get a popup asking
for ENTER PARAMETER VALUE... [Forms]![Locate Turn Id by
Contact Person Sub Frm]![TempTurnId]. If I enter the
turid number, the correct information is displayed. I've
tried reversing the Like statment and get the same result.


-----Original Message-----
Sounds as if the query that you're using as the
RecordSource of the "popup"
form has a parameter in it that needs to be filled, and
then you're also
using the WHERE argument of the OpenForm action to filter
the form's
contents (records from the recordsource's query).

If you're using the WHERE argument in the OpenForm
action, then likely you
can delete the parameter from the query (a parameter is
anything for which
the query needs a value: could be [Enter a value:] or
[Forms]![FormName]![ControlName] or such).

If this doesn't help, post back with the popup form's
query's SQL and the
specific macro actions that you're using, including the
arguments.


--

Ken Snell
<MS ACCESS MVP>

message
I have a subform listing multiple records. I want
to
be
able to click on a record and have a new form open
listing
the details. I tried running a macro(open form) when
clicking on the record, but I get a popup window asking
for the value then the form opens with the correct
window. I used the expression builder to set the where
condition. Any ideas?


.



.


.
 
Back
Top