Selasa, 06 November 2012

Re: [MS_AccessPros] DoCmd.OpenForm and then hide buttons on that form

 

Duane and John,

Wow! Will definitely put this into my tool kit!

Thanks!
Connie

--- In MS_Access_Professionals@yahoogroups.com, John Viescas <JohnV@...> wrote:
>
> Good suggestion, Duane.
>
> Connie-
>
> If you decide to use Duane's function, set up your OpenArgs with keywords:
>
> NumRec=xxxxx;ClearButtons=-1
>
> lngRecordNo = ParseAttrib(Me.OpenArgs, "NumRec", ";")
>
> varClear = ParseAttrib(Me.OpenArgs, "ClearButtons", ";")
>
>
> John Viescas, Author
> Microsoft Access 2010 Inside Out
> Microsoft Access 2007 Inside Out
> Microsoft Access 2003 Inside Out
> Building Microsoft Access Applications
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: Duane Hookom <duanehookom@...>
> Reply-To: <MS_Access_Professionals@yahoogroups.com>
> Date: Tuesday, November 6, 2012 7:20 PM
> To: Access Professionals Yahoo Group
> <ms_access_professionals@yahoogroups.com>
> Subject: RE: [MS_AccessPros] DoCmd.OpenForm and then hide buttons on that
> form
>
> I have a parsing function in almost all my applications that will pull a
> specific value out of a string.
>
> Public Function ParseAttrib(strText As String, _
> strAttrib As String, _
> strDelimiter As String)
> '---------------------------------------------------------
> ' Procedure : ParseAttrib
> ' Author : Duane Hookom
> ' Date : 10/1/2010
> ' Purpose : Pull a single value from a multi-value string
> ' the strText must use = to match an attribute with its value
> '
> ' Samples
> ' --------------------------------------------------------
> ' ParseAttrib("color=red;Age=50;Dog=False","Color",";")=red
> ' ParseAttrib("color=red;Age=50;Dog=False","dog",";")=False
> '---------------------------------------------------------
> Dim arText() As String
> Dim intI As Integer
> On Error GoTo ParseAttrib_Error
>
> arText() = Split(strText, strDelimiter)
> For intI = 0 To UBound(arText)
> If Split(arText(intI), "=")(0) = strAttrib Then
> ParseAttrib = Split(arText(intI), "=")(1)
> End If
> Next
>
> On Error GoTo 0
> Exit Function
>
> ParseAttrib_Error:
>
> MsgBox "Error " & Err.Number & " (" & Err.Description & ") in
> procedure ParseAttrib of Module basParseText"
>
> End Function
>
>
> > To: MS_Access_Professionals@yahoogroups.com
> > From: no_reply@yahoogroups.com
> > Date: Tue, 6 Nov 2012 18:00:43 +0000
> > Subject: Re: [MS_AccessPros] DoCmd.OpenForm and then hide buttons on
> >that form
> >
> > O Kee Do Kee--it's harder than I thought :-). I am already passing one
> >open arg to it (the number of record to look for) and now I want to also
> >pass "Hide Buttons".
> >
> > Can I pass several args and if so how?
> >
> > Thanks!
> > Connie
> >
> > --- In MS_Access_Professionals@yahoogroups.com, mrsgoudge <no_reply@>
> >wrote:
> > >
> > > Thanks John! What's interesting is that the Modal part is working.
> >When I think about it using OpenArgs should be easy. Thanks once again!
> > > Connie
> > >
> > > --- In MS_Access_Professionals@yahoogroups.com, John Viescas <JohnV@>
> >wrote:
> > > >
> > > > Connie-
> > > >
> > > > Won't work - at least not the Modal part. That has to be set before
> >the
> > > > form opens.
> > > >
> > > > Consider passing an OpenArgs to the form to tell it to hide all the
> > > > buttons, then do the button.Visible = False in the Load event of
> > > > Search_HomeInfo.
> > > >
> > > > John Viescas, Author
> > > > Microsoft Access 2010 Inside Out
> > > > Microsoft Access 2007 Inside Out
> > > > Microsoft Access 2003 Inside Out
> > > > Building Microsoft Access Applications
> > > > SQL Queries for Mere Mortals
> > > > http://www.viescas.com/
> > > > (Paris, France)
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: mrsgoudge <no_reply@yahoogroups.com>
> > > > Reply-To: <MS_Access_Professionals@yahoogroups.com>
> > > > Date: Tuesday, November 6, 2012 6:16 PM
> > > > To: <MS_Access_Professionals@yahoogroups.com>
> > > > Subject: [MS_AccessPros] DoCmd.OpenForm and then hide buttons on
> >that form
> > > >
> > > > 'Open Search_HomeInfo form with current listings, hiding buttons and
> > > > making modal
> > > > DoCmd.OpenForm "Search_HomeInfo"
> > > > Forms!Search_HomeInfo.btnChange.Visible = False
> > > > Forms!Search_HomeInfo.btnTracking.Visible = False
> > > > Forms!Search_HomeInfo.Command125.Visible = False
> > > > Forms!Search_HomeInfo.cboAddress.Visible = False
> > > > Forms!Search_HomeInfo.cboParcelN.Visible = False
> > > > Forms!Search_HomeInfo.Refresh
> > > > Forms!Search_HomeInfo.Modal = True
> > > >
> > > >
> > > >
> > > > ------------------------------------
> > > >
> > > > Yahoo! Groups Links
> > > >
> > >
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (8)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar