Sabtu, 02 Juli 2011

Re: [MS_AccessPros] Double click in subform to open another form

 

Thanks Duane! The button worked great, but I could not figure out how to
change the code to a function, still very new at this... I did find this
snippet of code online:

Private Sub EmployeeID_DblClick(Cancel As Integer)
DoCmd.OpenForm "Employees", , , _
"EmployeeID = Forms!Orders!EmployeeID"
End Sub

I changed it to match my fields and it opens the correct form, but prior to
opening the form a small box pops up asking for a "parameter". If you click
on ok it then opens the form, so I am guessing ther is something in the
above code that needs to be taken out, I am just not smart enough to see
it....

This is what it says now:

Private Sub Part_Name_DblClick(Cancel As Integer)
DoCmd.OpenForm "Parts", , , _
"Part_Name = Forms!Parts!Part_Name"
End Sub

Is there anyplace online that shows coding for various functions, etc so I
could study them to understand better what they say and how they work?

Thanks for all of your help!!

Deb

On Fri, Jul 1, 2011 at 7:28 PM, Duane Hookom <duanehookom@hotmail.com>wrote:

>
> You could start by using the command button wizard to add a button that
> opens the form. Then change the code to have it called from a function
> rather than the command button click. Then stick the function into the
> double click property of each of the controls in the detail section.
>
> Give it a try and come back if you have questions.
>
> Duane Hookom
> MS Access MVP
>
>
>
>
>

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___

Tidak ada komentar:

Posting Komentar