Hi Shannon
The code to open the other form is:
DoCmd.OpenForm "Contact Details", _ WhereCondition:="ContactID=" & Me.ContactID, _ WindowMode:=acDialog
Replace ContactID with the name of your primary key. If your primary key is a text field then enclose the value in quotes: WhereCondition:="ContactID='" & Me.ContactID & "'", _
The WindowMode:=acDialog bit tells Access not to do anything else until the form you are opening is either closed or made invisible.
Where you put this code depends on your preference. You could create a command button and add it to its Click event procedure, or you could perhaps use the DblClick event of the textbox showing the contact name.
Note that you can make a continuous or tabular form which displays many records but which is much more flexible and powerful than a datasheet form. -- Good Luck :-)
Graham Mandeno [Access MVP] Auckland, New Zealand
"mugziegumz via AccessMonster.com" <u47747[ at ]uwe> wrote in message news:8e6b9f2c2baaf[ at ]uwe...
[Quoted Text] > Brand new with access- > How can I create a command in datasheet form to open another form? Is this > possible? I tried doing the command in datasheet view/form but it didn't > work. > > > I'd like to create a command next to each person's name. So if I clicked > on > their last name in datasheet view-it'd open to a new form with lots more > detail. > Step by step instrucitons please! Where do I put the command in > properties? > My table name is "Contact Info" my form name is "Contact Details" which > give > a more in depth explanation of each employee such as evaluation comments. > Can someone give me a command and tell me where to put it and how to run > it? > Shannon > > -- > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200812/1>
|