Open form/subform with a doubleclick

  • Thread starter Thread starter Roger Svensson
  • Start date Start date
R

Roger Svensson

In my database I have a form which also includes a subform. I want to do
this: Doubleclick a value in the subform to open another form (or subform)
in which more detailed information about the clicked value is shown.
It's easy to just open a form with a doubleclick but I need to insert the
correct parameter(s) automatically. The form that want to open with the
doubleclick is derived from several tables.

Any ideas?

/Roger
 
There should be a unique ID for each row in the subform. It doesn't need to
be displayed, but it does need to be in the form. Assuming there is, the
code is:

DoCmd.OpenForm formname[, view][, filtername][, wherecondition][,
datamode][, windowmode][, openargs]

Or more simply:

DoCmd.OpenForm "FormName", , , "ID = " & Me.txtID

Where txtID is the name of the textbox holding the unique ID value.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Thanks for you response,

Is there any other solution than VB? I don't know VB I'm afraid...

/Roger

Arvin Meyer said:
There should be a unique ID for each row in the subform. It doesn't need to
be displayed, but it does need to be in the form. Assuming there is, the
code is:

DoCmd.OpenForm formname[, view][, filtername][, wherecondition][,
datamode][, windowmode][, openargs]

Or more simply:

DoCmd.OpenForm "FormName", , , "ID = " & Me.txtID

Where txtID is the name of the textbox holding the unique ID value.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

Roger Svensson said:
In my database I have a form which also includes a subform. I want to do
this: Doubleclick a value in the subform to open another form (or subform)
in which more detailed information about the clicked value is shown.
It's easy to just open a form with a doubleclick but I need to insert the
correct parameter(s) automatically. The form that want to open with the
doubleclick is derived from several tables.

Any ideas?

/Roger
 
You could also do a macro. I haven't written one in 10 years (or more) so
you might test thoroughly:

1. Click on Macro
2. Click on New
3. Choose OpenForm in the Action column.
4. Select the form name
5. Fill in the Where Clause (ID = Forms!FormName!txtID)
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

Roger Svensson said:
Thanks for you response,

Is there any other solution than VB? I don't know VB I'm afraid...

/Roger

Arvin Meyer said:
There should be a unique ID for each row in the subform. It doesn't need to
be displayed, but it does need to be in the form. Assuming there is, the
code is:

DoCmd.OpenForm formname[, view][, filtername][, wherecondition][,
datamode][, windowmode][, openargs]

Or more simply:

DoCmd.OpenForm "FormName", , , "ID = " & Me.txtID

Where txtID is the name of the textbox holding the unique ID value.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

Roger Svensson said:
In my database I have a form which also includes a subform. I want to
do
this: Doubleclick a value in the subform to open another form (or subform)
in which more detailed information about the clicked value is shown.
It's easy to just open a form with a doubleclick but I need to insert the
correct parameter(s) automatically. The form that want to open with the
doubleclick is derived from several tables.

Any ideas?

/Roger
 
Mission completed!

Many thanks!

Arvin Meyer said:
You could also do a macro. I haven't written one in 10 years (or more) so
you might test thoroughly:

1. Click on Macro
2. Click on New
3. Choose OpenForm in the Action column.
4. Select the form name
5. Fill in the Where Clause (ID = Forms!FormName!txtID)
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

Roger Svensson said:
Thanks for you response,

Is there any other solution than VB? I don't know VB I'm afraid...

/Roger

Arvin Meyer said:
There should be a unique ID for each row in the subform. It doesn't need to
be displayed, but it does need to be in the form. Assuming there is, the
code is:

DoCmd.OpenForm formname[, view][, filtername][, wherecondition][,
datamode][, windowmode][, openargs]

Or more simply:

DoCmd.OpenForm "FormName", , , "ID = " & Me.txtID

Where txtID is the name of the textbox holding the unique ID value.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

In my database I have a form which also includes a subform. I want to
do
this: Doubleclick a value in the subform to open another form (or subform)
in which more detailed information about the clicked value is shown.
It's easy to just open a form with a doubleclick but I need to insert the
correct parameter(s) automatically. The form that want to open with
the
doubleclick is derived from several tables.

Any ideas?

/Roger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top