Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: command button 2007

Geek News

command button 2007
"mugziegumz via AccessMonster.com" <u47747[ at ]uwe> 11/26/2008 1:35:03 AM
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!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1

Re: command button 2007
Tom van Stiphout <tom7744.no.spam[ at ]cox.net> 11/26/2008 1:54:37 AM
On Wed, 26 Nov 2008 01:35:03 GMT, "mugziegumz via AccessMonster.com"
<u47747[ at ]uwe> wrote:

No, a form in datasheet view cannot have buttons. Use a ribbon.
Perhaps not for an absolute newbie.

If you click - I would suggest double-click - the LastName, the
LastName_DblClick event occurs. THere you can open a new form.
Something like:
docmd.OpenForm "MyNewForm",,,"PersonID=" & Me.PersonID

-Tom.
Microsoft Access MVP


[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!
Re: command button 2007
"Damon Heron" <damon_327[ at ]hotmail.com> 11/26/2008 1:58:21 AM
The easiest way is to use the double-click event on the field (person's
name)
Private Sub YourField_DblClick(cancel as integer)
Dim stDocName As String
Dim strWhere As String

stDocName = "Your Form Name"
strWhere = "[Person] = " & "'" & Me.YourField & "'"

DoCmd.OpenForm stDocName, , , strWhere

end sub

Damon


"mugziegumz via AccessMonster.com" <u47747[ at ]uwe> wrote in message
news:8dbe168bf2c74[ 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!
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1
>


Re: command button 2007
"mugziegumz via AccessMonster.com" <u47747[ at ]uwe> 12/5/2008 8:08:30 PM
Where do I put this command? Being brand new with access-can I copy and paste
this info somewhere in my command? Thanks.
Shannon

Damon Heron wrote:
[Quoted Text]
>The easiest way is to use the double-click event on the field (person's
>name)
>Private Sub YourField_DblClick(cancel as integer)
> Dim stDocName As String
> Dim strWhere As String
>
> stDocName = "Your Form Name"
> strWhere = "[Person] = " & "'" & Me.YourField & "'"
>
> DoCmd.OpenForm stDocName, , , strWhere
>
>end sub
>
>Damon
>
>> Brand new with access-
>> How can I create a command in datasheet form to open another form? Is this
>[quoted text clipped - 6 lines]
>> detail.
>> Step by step instrucitons please!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200812/1

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net