UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Increment Number using code    
 
   
rminche
post Jan 15 2005, 10:03 AM
Post #1

UtterAccess Addict
Posts: 228



How do you use the index to find code to increment a number??
Go to the top of the page
 
+
dannyseager
post Jan 15 2005, 10:08 AM
Post #2

UtterAccess VIP
Posts: 13,031
From: Leicester, UK



I assume you want to add on 1 for each record?

try

=Dmax("YourFakeIDfieldInTable","Yourtablename") + 1
Go to the top of the page
 
+
rminche
post Jan 15 2005, 10:13 AM
Post #3

UtterAccess Addict
Posts: 228



Yes, thank you.

Is there a book that can help a person understand how to create code??
Go to the top of the page
 
+
Larry Larsen
post Jan 15 2005, 10:28 AM
Post #4

UA Editor + Utterly Certified
Posts: 22,722
From: Melton Mowbray,Leicestershire (U.K)



Hi
I very often have to refer to a VBA book for both help and often just clarity on a segment of code.
The book I have to hand is:
Beginning Access 97 VBA Programming
By Robert Smith & David Sussman
Wrox
ISBN 1-861000-86-3
Plus
Recommended Reading Access 97
HTH's
(IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+
rminche
post Jan 15 2005, 11:00 AM
Post #5

UtterAccess Addict
Posts: 228



thanks, will surely give it a try
Go to the top of the page
 
+
rminche
post Jan 15 2005, 11:30 AM
Post #6

UtterAccess Addict
Posts: 228



do i put the code in the table??
Go to the top of the page
 
+
R. Hicks
post Jan 15 2005, 11:45 AM
Post #7

UA Forum Administrator
Posts: 38,073
From: Birmingham, Alabama USA



What is this incremented number used for ???
How many records do you antisipate this table to contain over the lifetime of the application ???
Is this a multiuser application where the incremental number must be applied as the record is created ???

RDH
Go to the top of the page
 
+
rminche
post Jan 15 2005, 12:13 PM
Post #8

UtterAccess Addict
Posts: 228



1. log number

2. thousands, but may purge once a year

3. yes
Go to the top of the page
 
+
R. Hicks
post Jan 15 2005, 12:51 PM
Post #9

UA Forum Administrator
Posts: 38,073
From: Birmingham, Alabama USA



Here is the basic answer you need that I made at another post that in related to your problem ...

Basic Answer to Question

RDH
Go to the top of the page
 
+
rminche
post Jan 15 2005, 12:57 PM
Post #10

UtterAccess Addict
Posts: 228



thanks I will give it a try
Go to the top of the page
 
+
rminche
post Jan 15 2005, 01:26 PM
Post #11

UtterAccess Addict
Posts: 228



can you have two event procedure for ex. "on Current"?

I tried the code but the last number stays as a 1, and the middle number changes but only up to nine. the 00 in front stay the same
do I need to add something??
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 01:42 PM