SetValue from Form utilizing Subdatasheet Form

G

Guest

I would like to launch a specific record in a separate form from a form that utilizes a subdatasheet. I want the user to drill down to the record number using the “+†and “-“ in the subdatasheet. When the user sees the record number they want to view I want them to click or double click on the record number. I want this event to open another form with the chosen record. I would think event coding or some hyperlink would be of benefit here but I am too new to Access to know how to do this.

I am attempting to set a value from a subdatasheet form (subform datasheet view) into another form by having the user either double click on the record number or via hyperlink. The following macro sets the value successfully when the subform is open by itself.

RunCommand - FilterBySelection
SetValue - Item [visible] Expression No
OpenForm - Edit Mode

(Query for Form has criteria [forms]![nameofform]![recordnumber])

When the form is used as a subform the value cannot be set. I get the following error: "You can't hide a control that has the focus."
 
W

William Taylor

use the click event of the control that contains the record number to open
the second form. use openargs:= to pass the record number. now use the on
open event of the second form, with the find method of ADO, using the forms
recordset property. Look in online help for code samples.
JL_Man said:
I would like to launch a specific record in a separate form from a form
that utilizes a subdatasheet. I want the user to drill down to the record
number using the "+" and "-" in the subdatasheet. When the user sees the
record number they want to view I want them to click or double click on the
record number. I want this event to open another form with the chosen
record. I would think event coding or some hyperlink would be of benefit
here but I am too new to Access to know how to do this.
I am attempting to set a value from a subdatasheet form (subform datasheet
view) into another form by having the user either double click on the record
number or via hyperlink. The following macro sets the value successfully
when the subform is open by itself.
RunCommand - FilterBySelection
SetValue - Item [visible] Expression No
OpenForm - Edit Mode

(Query for Form has criteria [forms]![nameofform]![recordnumber])

When the form is used as a subform the value cannot be set. I get the
following error: "You can't hide a control that has the focus."
 

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

Top