Auto-Sequence Number When Deleting Field Midpoint

Nov 21, 2011

At present I am running Revit Architecture with DBLink to access to edit fields for shelving etc.

What i am doing is fitting out warehouses with 600+ shelving units and they are all numbered.

These numbers are tagged in the drawing.

What I am hoping to do is export the data to access (completed) then amend any changes within access.

Normally, we would put say 600 shelving units on a drawing all tagged 1-600. But then the client may want to delete shelving unit 321.

Leaving the drawing with all shelving units tagged 1-320,322-600.

How would i go about it so access renumbers all data after the deleted field (ie number 321)?

View Replies


ADVERTISEMENT

Auto Sequence Number For Reference Number

Dec 8, 2005

The title probably doesn't give an idea of what I need, so here goes.

We currently have reference #'s for our bills that include the date requested in mmddyy format, the first 3 letters of the customer, the initials of the order taker and finally a sequential number to show the sumber of bills that day.

example: 120705SEAGMM02 2nd order taken by GMM for Seagate on 12/7
120705SEARLH01 1st order taken by RLH for Seagate on 12/7

I want to generate this number automatically based on the date entered and the initials given of the user. We only deal with one customer at our desk so that will always be "SEA".

I have a query that generates the first portion (date, customer, and initials):

SELECT Format([REQDATE],"mm") AS [Month], Format([REQDATE],"dd") AS [Day], Format([REQDATE],"yy") AS [Year], Format([REQDATE],"mmddyy") AS [Both], [Both] & "SEA" & [PickUpReqData]![INITIALS] AS REFNO
FROM PickUpReqData;

But I can't seem to get my head around the part of generating the number. I know I had done this in a database I created 2 jobs ago but all my files were flooded out in Katrina. (I have since relocated to Atlanta, although I'm not looking for sympathy. But I will take what I can get!)

Anything to point me in the right direction will be appreciated. I am looking to have this on a form and feed the REFNO field in the PickUpReqData table.

Thanks.

Gary

View 3 Replies View Related

Sequence Break In Key Number Field

Mar 30, 2006

Hi!

1. If accidently a record or two in a sequence are deleted, how will you know that this has happened! What type of validation can be enforcedto prevent this?

2. How do you make your Tables, Quries, Forms, Reports, Macro tamper proof?

Please help!

Orsonros

View 2 Replies View Related

Modules & VBA :: Populate A Field With A Sequence Number Based On Two Criteria?

Sep 11, 2014

I am trying to get the max of an integer field if the ProjectNumber field is equal to the ProjectNumber field in the current record. I have used code similar to the one below before but it was on a date field, then add one.

Me.RevisionNumber = Nz(DMax("[RevisionNumber]", "dbo_ProposalLog", "[ProjectNumber] =" & Me.ProjectNumber), 0) + 1

The ProjectNumber field is a text field.

View 6 Replies View Related

Modules & VBA :: Reset Autonumber And Keep Sequence After Deleting Record

Feb 28, 2014

I have a Microsoft Access database with SQL Server backend with 10000 records in my table, I have a autonumber field and in my database the purpose of the autonumber field is just to keep the record sequence (not to treat as a unique identifier) and I don't want to use a number field to manually enter the sequence. Whenever the record is deleted or the user won't save the record, it put gaps in the record sequence, Is there any way to refresh the autonumbers automatically "After delete confirm" event or "After Insert/update" even.

View 13 Replies View Related

General :: Getting Invoice Number Field To Auto Generate Next Number

Jun 2, 2014

I'm trying to get an invoice number field to auto generate the next number, keeping the format as "00000"...this is what I have, which gets the next number but drops the leading 0

Code:

Private Sub Customer_AfterUpdate()
If Len(Me.[InvoiceNumber] & vbNullString) = 0 Then
Me.[InvoiceNumber] = (DMax("[InvoiceNumber]", "[tblInvoiceNumber]") + 1)
DoCmd.RunCommand acCmdSaveRecord
End If
End Sub

invoice numbers are 04024, 04025 etc...how I keep the formatiing?

View 5 Replies View Related

Modules & VBA :: Sequence Number In Query Use A Starting Number

Sep 20, 2014

creating sequence number in a query using a starting number. For example i want to use the starting sequence number as 5

---SEQNUM---------COLOR-----------
-----5------------------blue--------------
-----6------------------red---------------
-----7------------------orange-----------
-----8------------------black-------------

View 2 Replies View Related

Appending Records With A Desired Auto Number In A Table With Auto Number

Oct 26, 2005

Here is my issue. In a table with an Auto Number index some records have been deleted. I have been able to recreate them along with their original auto number. The problem is that I do not know how to append these records forcing the original auto number. I have tried changing the auto number field to a number field in the table, this works except I cannot change it back to auto number.

I am sure I’m not the first with this question or issue. I did search through a couple hundred entries about auto number before I posted this question.

Jim

View 7 Replies View Related

Reports :: DLookup With Auto Date - On Load Sequence

Dec 17, 2014

Ok, so I have this table (tblPayPeriod) with the fields Start Date, Stop Date, Pay Period & Percent FY. The Percent FY field is a Number field that gives off the percent of the fiscal year (FY) that we are in.

Then I have a report (rptDistrictMgr) that in the header I want it to display what percent of the fiscal year we are in based on the Auto_Date that is in the header.

So, if the Auto_Date is December 17, 2014, we are (according to tblPayPeriod) 24.1% into the fiscal year and I want the 24.1% to display in the text box which called Text99.

I would just like a simple dlookup that I can use as the control source of the text box or an expression to put into the On Load sequence.

View 6 Replies View Related

Auto Number Field Problems

Jan 25, 2006

Hi guys,

Just a quick one ( I think )

I have a table which already has an autonumber ( the id field )
But I need to create another field also with an auto generated number which will generate reference number which i need to start at a pre-defined number.
The problem is, im not allowed to use 2 auto number fields, and access is prompting me to use a number field instead.

The question is, is there a way around this ?
Can i create another field which works the same way as an auto number and increments the number by 1 for each new record entered ?

Many thanks in advance for any help.

Max

[edit: spelling mistakes]

View 2 Replies View Related

Auto Number / Type Field

Oct 15, 2007

I have an order table [OrderMain], which contains [OrderNumber] "Auto Number" along with various customer related only info

Then i have a order line table [OrderLines] which contains the items ordered. Which looks like

OrderNumber
OrderLine
PartNumber

These tables are in a form, relationship of [OrderNumber]

This structure enables me to order as many parts as i'd like against 1 order number.

What i would like to do is set something similar to a auto number in the OrderLines table. This would be in the Lines Field.

The problem is, AutoNumber can't be used in the [Lines] field as each new order line # would continue from the last #.

The result would look like:

View 3 Replies View Related

Auto Number Using A Field And Letters

Aug 25, 2014

The big issue is wanting to create the following records in a subform every time a new record in the subform is added. I can populate the Ticket field and know how to cast fields as strings to append them (so I can get the Cylinder field). The output is used to populate a table called Cylinders. My question is:

How do I create a field of letters (or numbers) corresponding to the row in the subform without continuing from the previous letter (or number) in the Cylinders table?

Ticket
Letter
Cylinder

1589
A
1589A

1589
B
1589B

1600
C
1600C

1600
D
1600D

1600
E
1600E

View 2 Replies View Related

Adding Sequence Number To A Query

Apr 3, 2007

I have a query that captures date values from a table based on a between function that works fine. What I would like to do is associate a sequence number fro each date value returned and either perform a make table or leave it as a select query. If I create a table I know that I aam able to add an autonumber field but the query is executed frequently and performing the addition of the autonumber field is not feesible. Any thoughts how I can generate the sequence number each time the query is executed?

Thanks

View 3 Replies View Related

Tables :: How To Get Sequence Number From Table

Sep 17, 2013

i want to know such a method that if i give a number, the database find me the next available number from the given list in the table.for example, i have a table having list of numbers like 6500, 6501, 6502 etc, I give the number 6500, the database should give me the next available number in sequence from that given list in the table.

View 7 Replies View Related

Insert Sequence Number In Query

Nov 12, 2013

I would like to insert a sequence number into a query that currently returns 7367 rows.

Here's what it looks like now:

ID_NUM
DTE_FIN_TRANS_RCV

1322
9/27/2012

1322
7/10/2012

1011
7/2/1999

1011
9/22/1999

1011
10/21/1999

Here's the desired outcome with sequences:

ID_NUM
DTE_FIN_TRANS_RCV
SEQUENCE

1322
9/27/2012
1

1322
7/10/2012
2

1011
7/2/1999
1

1011
9/22/1999
2

1011
10/21/1999
3

All I need is a way to number rows with a value higher than the previous for that particular ID_NUM.

View 4 Replies View Related

Use 2 Different Controls To Increment Number Sequence

Feb 1, 2013

I'm trying to code for a 'duplicate record' button on a form that, as well as copying the values of all the controls of the previous record to the new record, makes a certain control (which contains a number) increment as appropriate.

There are two controls on the form which contain the start and end values of a numerical sequence (of potentially any length) e.g. the range 48-82 shows 48 in text box boxREGSEQSTART and 82 in the text box boxREGSEQEND OR the single value 99 shows 99 in text box boxREGSEQSTART and text box boxREGSEQEND is empty. In a record, the value of boxREGSEQEND would always be higher than that of boxREGSEQSTART or would be blank.

The appropriate incrementing action would be:

After clicking 'Duplicate Record' button, If there is no value in boxREGSEQEND in the record being copied, then in the new duplicated record the value of boxREGSEQSTART should be 1 greater than the value of boxREGSEQSTART in the record it has been copied from.

i.e. the record being copied is records a single item, a single value, and the next record should show the sequence moved on by one

OR

If there is a value in boxREGSEQEND in the record being copied, then in the new duplicated record the value of boxREGSTART should be 1 greater than the value of boxREGSEQEND in the record it has been copied from.

i.e. the record being copied is recording multiple items, a sequence, but the next record should still show the sequence moved on by one

I can get the duplication to work no problem, and I can get the incrementing to work fine for the first set of conditions, but can't for the life of me get it to increment when there is a range!

The logic (in my head, expressed as best I can in the macro language ) for the whole sequence of actions goes like so:

RunMenuCommandCommand SelectRecordRunMenuCommandCommand CopyRunMenuCommandRecordsGoToNewRunMenuCommandCommand SelectRecordRunMenuCommandCommand Paste
If [boxREGSEQEND]=[IsNull] Then
GoToControlControl Name boxREGSEQSTARTSetValueItem = [boxREGSEQSTART]
Expression = [boxREGSEQSTART]+1Else
GoToControlControl Name boxREGSEQSTARTSetValueItem = [boxREGSEQSTART]
Expression = [boxREGSEQEND]+1GoToControlControl Name boxREGSEQENDSetValueItem = [boxREGSEQEND]
Expression = [boxREGSEQEND]=Null

Which I would assume would tell the program to copy the current record, make a new one and paste the copy, then if there was a range recorded in the original, start the numbering of the new record one number higher than the end of that range and clear the way in the new form in case it also records a range, otherwise just increment the sequence along by one.

View 3 Replies View Related

Resetting Auto-number Field Back To Zero

Mar 13, 2008

I have a primary key field called "Issue Number", with the properties set to auto-number.

After testing, I need to set it back to zero before going live.

I deleted all the records and did a compact and repair, but the first number that comes up is the one after the last one used during testing.

Help????

Thanks

View 14 Replies View Related

Append A Record Using Vba Where There Is An Auto Number Field

Jan 5, 2006

Hi, basically what i want to do is append a record to a table using vba. I would like to take two values from my form (productID, supplierID) and insert them into a table (supplierProductsTBL) under the same headings. I've constructed an sql statement but am getting the following error:

runtime error '3346'

number of query values and destination fields are not the same'

I think this happens because the table also contains an autonumber field (supplierProductID) and i'm not referencing this in my sql statement (below):

mySQL = "INSERT INTO SupplierProductsTBL ( SupplierID, ProductID ) VALUES ('" & SupplierID & "'), ('" & ProductID & "')"

i wuld just get rid of the autonumber field but i need this.

Any help on this would be appreciated, cheers mark.

View 6 Replies View Related

Queries :: Auto Number Field In Query?

Nov 22, 2014

I don't know why is it so complicated to add an auto number field in a query. I would like to add a increment number (auto number) on each line and then an auto number on each product.

View 7 Replies View Related

Tables :: Reset Auto-number Field

Apr 10, 2014

I have a table which will be completely emptied and refilled. The table has a field autonumbered it is also the primary key. When the table is refilled I want this field to start from 1. How can I do that. Yes some people will say this subject has been discussed search for it. But here the issue is somewhat different we have an existing field and I do not want to compact the database each time the procedure runs.

View 1 Replies View Related

Tables :: Format Auto-number Field

Oct 25, 2012

I would like to format the AutoNumber field so that it shows the current year - #...i.e. 2012-01.

View 4 Replies View Related

Tables :: How To Reset Auto-number Field

Dec 9, 2014

how to reset autonumber field.

View 6 Replies View Related

Generate Record Number Sequence In Query?

Mar 23, 2006

Hi -

Suppose I have a generic query that returns a group of records.

Is there some way to generate a field containing the number sequence of each record? E.g. if there are 10 records, generate the numbers 1 through 10?

Must be a simple way to do this, I'm just a bit dense today...

Thanks,

-g

View 1 Replies View Related

Queries :: Sequence Number Reset At Each ID Exchange

Nov 18, 2014

I have two tables - one with parent Records, the other with child records. The ID links the two tables .I want to add a sequence number on the child table which resets at each ID change. What would be the best way to accomplish this?

Code:
PC_ID ID Name Address

P 1 Parent1 Address1
P 2 Parent2 Address1

PC_ID ID Name Address SEQ

C 1 Child1 Address1 1
C 1 Child2 Address1 2
C 1 Child3 Address1 3
C 1 Child3 Address1 4
C 2 Child1 Address1 1
C 2 Child2 Address1 2
C 2 Child3 Address1 3

View 4 Replies View Related

Modules & VBA :: Database With 7 Columns - How To Number In Sequence

Jun 11, 2015

I have a table in a database with 7 columns. The data is sorted by Date1 in descending order.

For each pid I want to put the sequence numbers
First record has two conditions
If string 2 is null then start numbering from sequence1
If string 2 is not null then start numbering from sequence2
If string 2 = string1 then
Sequence1 = 0
Second record has two conditions
Number sequence2 with the value 2 or 3 depending on the line one
If string 2 = string1 then
Sequence1 = 0
Else
Sequence1 = next number
Same condition for the rest of records

View 5 Replies View Related

Create A Sequence Number For Each Record Associated To Foreign Key

Jun 6, 2012

I have data in a table that looks like the first table and I would like to write a query to update the sequence so it looks like the second table.

PersonID
Color
Sequence

1
Red

1
Blue

1
Green

2
Blue

3
Red

3
Blue

PersonID
Color
Sequence

1
Red
1

1
Blue
2

1
Green
3

2
Blue
1

3
Red
1

3
Blue
2

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved