A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access File System



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2004, 03:20 PM
gperson
external usenet poster
 
Posts: n/a
Default Access File System

Hey Guys, I'm trying to set up a data base for an office file system. We have alot of paper stuff here and we're trying to use access to help us file everything in an easier way. I'm trying to set it up so that Access will give me a file number, and a sub number. So far I've set up the numbers for the main categories, but I'm trying to come up with a formula that will take the main ID cell and add 1 for the first file number cell and add 2 for the second cell and 3 for the third cell and so on. Can anyone hlep?
  #2  
Old July 8th, 2004, 05:48 PM
Tim Ferguson
external usenet poster
 
Posts: n/a
Default Access File System

"=?Utf-8?B?Z3BlcnNvbg==?=" wrote in
:

So far I've set up the numbers for the main categories, but I'm trying
to come up with a formula that will take the main ID cell and add 1
for the first file number cell and add 2 for the second cell and 3 for
the third cell and so on. Can anyone hlep?


this works for a single-user system:

Nz(DMax("SerialNumber", "Files", "MainID=" & dwMainIDNumber), 0) +1



Going from the middle:

"MainID=" & dwMainIDNumber

creates a WHERE clause to look for serialnumbers associated with the MainID
you are currently looking for.

DMax("SerialNumber", "Files", "MainId=11023")

looks up the highest serialnumber allocated so far, kept in the Files
table.

Nz(etc, 0)

checks the returning number for NULL (for example, if it's a new MainID
with no files yet allocated) and replaces it with zero.


Nz() + 1

adds one to get the next number -- or 1 if it's the first one.

Hope that helps


Tim F

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Application must be installed to run Error Keith Setup, Installing & Configuration 1 June 29th, 2004 03:02 AM
Need help with Access decision aualias General Discussion 23 June 21st, 2004 02:04 AM
A2k not running Access 2003 file Keith G Hicks New Users 1 June 14th, 2004 04:49 AM
Product Key for Office XP P.G.Indiana Setup, Installing & Configuration 1 June 7th, 2004 03:22 AM


All times are GMT +1. The time now is 01:48 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.