Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datasheet ActiveControl Question 1

Status
Not open for further replies.

mgabbert

Programmer
Sep 25, 2003
9
0
0
US
I have a subform datasheet which exists for example as so:
ID Name

When you double click on the row a new form is opened with a filter on the ID.

I do this by using the ActiveControl as my filter.

However I do not want to display the ID in the Datasheet.

If I do ID.ColumnHidden = True, then the ActiveControl becomes Name and my application breaks.

Any suggestions?

Thank you,
-matt
 
In stead of referencing ActiveControl, you should be able to reference the control holding the primary key. If the field it's bound to is ID, then the control is probably txtID?

[tt]docmd.openform "myform",,,"id=" & me("txtID").value[/tt]

Roy-Vidar
 
Thank you!

I was expecting this type of action to be under a .Selected, but it works exactly right.

-matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top