you can define the function IN ONE PLACE on the database server..
instead of 1,000 different copies of the same function
On Aug 6, 6:35*pm, "Arvin Meyer" <arv...@invalid.org> wrote:
> As does VBA, VB.NETm and most other languages that can interact with a data
> engine. So what? If you aren't going to answer the OPs question, what's the
> point of answering at all.
> --
> Arvin Meyer, MCP, MVPhttp://www.datastrat.comhttp://www.accessmvp.comhttp://www.mvps.org/access
> Co-author: "Access Solutions", published by Wiley
>
> "a a r o n . k e m p f @ g m a i l . c o m" <aaron.ke...@gmail.com> wrotein
> messagenews:4b03cec7-e050-42dd-a16c-(E-Mail Removed)...
> SQL Server allows you to build a tsql function and use that for
> defaults on fields
>
> -Aaron
>
> On Aug 3, 12:54 am, KLR <k.robe...@ucas.ac.uk> wrote:
>
> > On 2 Aug, 17:38, "Jeff Boyce" <nonse...@nonsense.com> wrote:
>
> > > Hopefully you (if not your users) are aware that calling it a "custom
> > > autonumber" field doesn't make it equivalent to an Access Autonumber
> > > field...
>
> > > Provided that the users (who are NOT always right, but are always the
> > > users)
> > > get something that looks like what they think they want, how you get
> > > there
> > > (behind the curtain) isn't important (to them), right?
>
> > > Arvin offered one approach.
>
> > > Another approach would be to add together the current year and 37,990,
> > > then
> > > add a sequence number. That sequence number would need to "re-start" at
> > > 1
> > > each year, so your routine that generates the "next" sequence number
> > > would
> > > need to find the previous maximum sequence number for the year, then add
> > > one. I believe that approach is what Arvin was suggesting.
>
> > > To get some ideas on how to build your sequence number procedure, search
> > > for
> > > "custom autonumber" on-line, and follow the links Arvin provided.
>
> > > Good luck!
>
> > > Regards
>
> > > Jeff Boyce
> > > Microsoft Access MVP
>
> > > --
> > > Disclaimer: This author may have received products and services
> > > mentioned
> > > in this post. Mention and/or description of a product or service herein
> > > does not constitute endorsement thereof.
>
> > > Any code or pseudocode included in this post is offered "as is", withno
> > > guarantee as to suitability.
>
> > > You can thank the FTC of the USA for making this disclaimer
> > > possible/necessary.
>
> > > "KLR" <k.robe...@ucas.ac.uk> wrote in message
>
> > >news:4f4b0d75-f0fd-4c17-a577-(E-Mail Removed)....
>
> > > > Hi everyone
>
> > > > I need to create a custom autonumber field in my table that is
> > > > sequential and based on another fields value.
>
> > > > I have a field which shows a dropdown of years. I now need a separate
> > > > number field that commences 40001 if the year selected is 2010, 50001
> > > > if 2011 is selected, 60001 if 2012 selected and so on. Thus when a
> > > > new record is created for 2010, the record numbering will start at
> > > > 40001 incrementing by 1 each time a new record is created for 2010.
>
> > > > Is this feasible in Access? BTW this is not my chosen method for
> > > > numbering records but has been requested by my users and they will not
> > > > budge on this!- Hide quoted text -
>
> > > - Show quoted text -
>
> > Crumbs, thanks guys! Good suggestions and has given me lots to think
> > about.
|