473,385 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Auto numbering - some code please

4
I’m a bit of a drag and drop merchant, but this one can’t be solved using the wizards. Would someone be kind enough to point me to some code which will allow me to resolve the following:-

My table has three fields Phase, Section and DrawingNo. I’m wishing to record new numbers in the DrawingNo field, when a new Section is added within an existing Phase then assign the next available sequential number or reset to 1 if a new Phase value is added.

Thanks

Using Access 2000
Sep 28 '06 #1
3 1294
PEB
1,418 Expert 1GB
Hi,

U need this in form or in table or a query?

In table in Access It seems a bit impossible coz there isn't the kind of triggers that maybe u are looking for...

:)
Sep 30 '06 #2
MalcR
4
Hi,

U need this in form or in table or a query?

In table in Access It seems a bit impossible coz there isn't the kind of triggers that maybe u are looking for...

:)
Hi,

The input will be via a form
Oct 3 '06 #3
PEB
1,418 Expert 1GB
Ok,

So..


In your form...
Go to your control named Phase

After update event procedure for phase:
Me!DrawingNo=1

After update event procedure for Section:
Me!DrawingNo=nz(Dcount("DrawingNo","YourTable","Se ction='"+Me{Section}+"'"))+1



Best regards
Oct 7 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Steven Burn | last post by:
I'm curious, I've written a very simple PIS (personal info store) that allows one to store whatever they wish..... the problem is, when one deletes an entry, the auto-numbering isn't corrected to...
5
by: Charles McCaffery | last post by:
I have written a database with auto-numbering and now wish to remove alkl of my test data and set the auto-numbering back to one. How do I do this please? Charles McCaffery.
6
by: MJ | last post by:
No one answered my original e-mail--it probably wasn't clear. I am hoping this makes the question a little clearer. Is it possible to combine both letters and numbers in an auto number? I can't...
6
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
3
by: Chris | last post by:
Before I started to create table, etc to track unique form field record number assigments I thought I'd check to see if there is now a better way to do this in .NET. I have a parent form (table)...
10
by: Marina | last post by:
Can anyone tell me if there is a way to auto number by category? I have 2 tables, ExpenseCategories and Vendors. Each there are many vendors to each expense category, but each category has a...
1
by: Jim | last post by:
I have a new database in which I have a form where in one field I type a letter A, B, C or D and the field next to it autofills (auto lookups) with a description associated with the specific...
6
by: orit | last post by:
I have a word document that contains a table. The table has 2 columns and hundreds of rows. I want to number the items in the table in the following way: In the first column, each cell will contain...
8
by: zeilak | last post by:
I am running Windows XP, Access 2002. I want to know the VB code for the following: I want to type in the ID # (it's the primary key and is auto-numbering) and then have the access form...
0
by: jimratajski | last post by:
Can anyone tell me how to automate page numbering of spawned page templates in Acrobat? I have a number of forms containing hidden page templates that I would like to be auto numbered as they are...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.