Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - "AutoValue" in Ms Access
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

"AutoValue" in Ms Access

 Post Reply Post Reply
Author
Amateur View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 July 2004
Location: Ireland
Status: Offline
Points: 210
Post Options Post Options   Thanks (0) Thanks(0)   Quote Amateur Quote  Post ReplyReply Direct Link To This Post Topic: "AutoValue" in Ms Access
    Posted: 22 December 2004 at 7:34am
Hi all,
 
I am wondering if anyone knows how to create an "AutoValue" in Ms Access. To take as an example, when a ne record is added, a particular field is incremented from R001 to R002. I am aware of auto number but this doesnt allow for characters, only numbers.
 
Anyone know how to do the above?
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2004 at 11:48am
the only real easy way i can think is opening a query to get the last records ID value then use a temp value of the veriable,

say trim the left side off... CLNG the rest and then +1 and recreate the veriable. and add it into the record as the Primary key with required.

Just an idea. there might be an easier better way.
Back to Top
Amateur View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 July 2004
Location: Ireland
Status: Offline
Points: 210
Post Options Post Options   Thanks (0) Thanks(0)   Quote Amateur Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2005 at 10:54am
I have come up with another way that would solve my problem, help is needed though!
 
I was wondering how i could do the following in MS Access. I want a field called ref to automatically contain the same value as the primary key which is called Pid when a record is entered. Is this possible and if so, how?
 
Thanks.
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2005 at 11:32am
In SQL Server it is @@IDENTITY, in access I am not sure
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.