Jumat, 15 Maret 2013

RE: [MS_AccessPros] How do I establish the first day of "Next Fiscal Year"

 


John,

User code is possible but beyond my capabilities and is off - topic
because it needs Java Script.

Thanks for your interest.

Robin

At 15/03/2013 06:15 PM, you wrote:
>Robin-
>
>
>
>Ah. You really need to be able to calculate the value based on today's
>date. You could use an IIf expression in the query in Access to generate
>the correct value, but then the field wouldn't be updatable. Does ASPMaker
>let you write simple code?
>
>
>
>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)
>
>
>
>
>
>
>
>From: MS_Access_Professionals@yahoogroups.com
>[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Robin Chapple
>Sent: Thursday, March 14, 2013 9:58 PM
>To: MS_Access_Professionals@yahoogroups.com
>Subject: RE: [MS_AccessPros] How do I establish the first day of "Next
>Fiscal Year"
>
>
>
>
>
>
>John,
>
>It is not an Access form. I load an Access database to the remote
>site and I use a code generator, ASPMaker, which produces the page
>for data entry. The SQL needs to be in a query.
>
>At 15/03/2013 12:42 AM, you wrote:
> >Robin-
> >
> >
> >
> >Perhaps put code like this in the form's BeforeUpdate event:
> >
> >
> >
> >Private Sub Form_BeforeUpdate(Cancel as Integer)
> >
> >
> >
> > ' If on a new record
> >
> > If Me.NewRecord Then
> >
> > ' If today is after July 1,
> >
> > If Date > DateSerial(Year(Date), 7, 1) Then
> >
> > ' Use July 1 of next year
> >
> > Me.NextFiscalYear = DateSerial(Year(Date) + 1, 7, 1)
> >
> > Else
> >
> > ' Use July 1 of this year
> >
> > Me.NextFiscalYear = DateSerial(Year(Date), 7, 1)
> >
> > End If
> >
> > End If
> >
> >
> >
> >End Sub
> >
> >
> >
> >
> >
> >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)
> >
> >
> >
> >
> >
> >
> >
> >From: MS_Access_Professionals@yahoogroups.com
><mailto:MS_Access_Professionals%40yahoogroups.com>
> >[mailto:MS_Access_Professionals@yahoogroups.com
><mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of Robin
>Chapple
> >Sent: Thursday, March 14, 2013 11:11 AM
> >To: MS_Access_Professionals@yahoogroups.com
><mailto:MS_Access_Professionals%40yahoogroups.com>
> >Subject: RE: [MS_AccessPros] How do I establish the first day of "Next
> >Fiscal Year"
> >
> >
> >
> >
> >
> >
> >Thanks John,
> >
> >The form is on a remote server.
> >
> >Our next fiscal year is 1/7/2013 -30/6/2014.
> >
> >I need the query to add 1/7/2013 by default when anyone adds a new name.
> >
> >Many thanks,
> >
> >Robin
> >
> >At 14/03/2013 06:18 PM, you wrote:
> > >Robin-
> > >
> > >
> > >
> > >Are you saying that July 1 of this year starts fiscal year 2014? What
>does
> > >the user enter in "Next Fiscal Year" (I assume this is in a form), and
>what
> > >do you expect to happen?
> > >
> > >
> > >
> > >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)
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >From: MS_Access_Professionals@yahoogroups.com
><mailto:MS_Access_Professionals%40yahoogroups.com>
> ><mailto:MS_Access_Professionals%40yahoogroups.com>
> > >[mailto:MS_Access_Professionals@yahoogroups.com
><mailto:MS_Access_Professionals%40yahoogroups.com>
> ><mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of Robin
> >Chapple
> > >Sent: Thursday, March 14, 2013 7:25 AM
> > >To: MS_Access_Professionals@yahoogroups.com
><mailto:MS_Access_Professionals%40yahoogroups.com>
> ><mailto:MS_Access_Professionals%40yahoogroups.com>
> > >Subject: [MS_AccessPros] How do I establish the first day of "Next Fiscal
> > >Year"
> > >
> > >
> > >
> > >
> > >
> > >My organisation has a fiscal year that starts on 1st July.
> > >
> > >I need the SQL for a query that will enter 1/7/'nextfiscalyear' when
> > >we enter names for committees and other posts in the 'Next Fiscal Year'.
> > >
> > >It has completely baffled me. That is not difficult as some of you
> > >know already.
> > >
> > >Many thanks,
> > >
> > >Robin Chapple
> > >
> > >
> > >
> > >
> > >
> > >[Non-text portions of this message have been removed]
> > >
> > >
> > >
> > >------------------------------------
> > >
> > >Yahoo! Groups Links
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >[Non-text portions of this message have been removed]
> >
> >
> >
> >------------------------------------
> >
> >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 (7)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar