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 Replies


ADVERTISEMENT

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 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 :: 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

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

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

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

Queries :: Make Table To Add Sequence Number To Records

Jan 14, 2014

I am looking to make a table which adds a sequence number to my records.

Example data would look like this

Acc no Date
1234535 01/01/2013
1234535 05/01/2013
1234535 11/01/2013
9876543 02/01/2013
9876543 22/02/2013
9876543 01/03/2013

I want it to add a deq based on the account no then date in sequence oldest to newest.

Acc no Date Seq
1234535 01/01/2013 1
1234535 05/01/2013 2
1234535 11/01/2013 3
9876543 02/01/2013 1
9876543 22/02/2013 2
9876543 01/03/2013 3

View 5 Replies View Related

General :: DLookup - Resetting Sequence Number In A Table?

Oct 8, 2013

Occasionally a user of mine needs to reset a sequence number in a table.

A few months ago I made him a simple app that has two text entry boxes and a button. The first text entry box uses a dlookup:

Code:
=DLookUp("sSessionNumID","qryGetAPIsessionLastValue")

...the other textbox ties to an update query, which updates the sequence number with the new value supplied by the user. Simple.

Then about a week ago it stopped running the dlookup part - nothing shows in the text box that is to show the current sequence num.

Oddly, if I enter a value in the update text box and press the button to update the sequence number (which still works) -- the previously dormant dlookup textbox now shows the new value - so it works ...it just doesn't want to work on this one workstation unless the update query is run first.

What can this be? The update button merely calls a DoCmd.RunSQL with both an insert (storing old value locally in ms access table) and an update (updating the sql server table's seq number using an ODBC DSN and sql server driver).

It's almost like the dlookup falls asleep now and won't wake up until the update is run...

View 2 Replies View Related

Queries :: Extract Or Calculate Number Of Records In A Sequence

Jan 4, 2014

How to extract or calculate the number of records in a sequence - e.g. in a table/query ordered by ID and date, the number of consecutive records by date for a given ID that have a value >= 50 in a given field. Is there a way of doing this purely within a query, or would I have to resort to a VBA loop through a recordset and keep a count of the consecutive records that match that criteria?

View 3 Replies View Related

Forms :: Incremental Numbering From Existing Number Sequence

Aug 28, 2013

I have a Primary Key field named Member ID(Number format) in a Table named Mail List. The field is populated with existing ID numbers and my need is to use my Member Entry Form to increment by 1 from the last entry.

I have gleaned from other references that this can easily be achieved by the following entry in the Default Value of the property sheet for the relevant field;

=DMax("Member ID","Mail List")+1

The Form saves without error but when I attempt to add a new record in the entry form, the ID Number reads "#Error".

View 14 Replies View Related

Control And Automate Number Sequence In Access 2010

Apr 30, 2015

I do not want to use AutoNumber to generate my Stock Control Number. I need to somehow automatically generate a number so that when I enter data and then make an error it does not mess up the numbering system like AutoNumber does.

I am a novice who is will to try to do what it takes to get this going properly. I cant find anything online relating to Access 2010.

View 3 Replies View Related

Queries :: Adding Sequence Number To Transactions Based On Date And Unique ID

Jul 29, 2014

I have a set of transactions with a Unique ID field and a date. I want to add a field based that gives me the sequence of events for each Unique ID in order of when it happened.

For example, if customer X has 6 transactions, the sequence field would have a number (1-6) in each record that corresponds to the order in which those transactions occurred. The first transaction would have the number 1, the second would have the number 2 and so on.

View 3 Replies View Related

Break Apart A Text Field

Apr 28, 2008

I am getting data passed to me in one field that needs to be broken apart. The data is first name, middle name, last name and birthdate but its in one field that looks like this:

john/mark/doe/06121972

Is it possible to break apart this field into 4 separate fields?

View 4 Replies View Related

Break Up A Single Field Address

Mar 2, 2007

I am a struggling low level user and any help will be appreciated. I’m trying to get data out of an old database and into a new one. The following addresses will give you some idea as to what my problem is. :confused:

I would like to break up the following single field address (Note the different pieces of data.
Washington Blvd 1407
Jefferson ST 234 N
Benjamin Ave 2105 N #1
Lincoln Cir 1407 N Unit 201 (Notice the space after Unit)

and have it look like this
Field one: 1421
Field two: N,S,E or W
Field three: BENJAMIN ST, Ave, or etc
Field four: Anything left over

If you can help, please talk very slow and loud cus I'm old and not too bright. I have limited experience with Instr, Mid, Left and Right functions, but can never seem to get them to work in a SQL statement I think I need to use multiple append queries but I’m guessing and then how do I get all the pieces into one table. :o

Thank you in advance

View 8 Replies View Related

Queries :: Create Numerical Sequence Based On Second Field

Aug 30, 2014

Have two tables: Assignment and StudentHeader - they are related by AssignmentGUID

Have the SQL:

SELECT StudentHeader.[Student ID], StudentHeader.GUID
FROM Assignment INNER JOIN StudentHeader ON Assignment.GUID = StudentHeader.[Assignment GUID]
WHERE (((Assignment.[Assignment Type])="Q") AND ((Assignment.[Assignment Number])=2))
GROUP BY StudentHeader.[Student ID], StudentHeader.GUID
ORDER BY StudentHeader.[Student ID], StudentHeader.GUID;

This returns:

Student IDGUID
al003072274
al154636303
al154636463
al595048272
al941626429
am180614426
am750033300
am750033462

I want a third field - Sequence - based on the Student ID and GUID, therefore

Student IDGUIDSequence
al0030722741
al1546363031
al1546364632
al5950482721
al9416264291
am1806144261
am7500333001
am7500334622

View 14 Replies View Related

Queries :: How To Run A Number Of Queries In Sequence

Aug 4, 2014

I do same thing each month and would like to make it easier/faster: is there a way to run many queries, one after another?

I cannot use macro, cause Run SQL is restricted to 255 characters and my queries SQL codes are longer than that.

Is there a way to run them in a row? Like run query1, wait till its finished, then run 2..3..4.

View 10 Replies View Related

Queries :: Extract Number Out Of Field And Update Extracted Number To Another Field

Feb 6, 2015

791335.12pack. This is the object that is in one of my access fields. I need to extract the 12 and place that in another column called qty.

View 1 Replies View Related

Number Fields In Text To Number Field, Formula For Fiscal Year

Nov 26, 2004

Date of Birth (DOB) field etc. in one program are text - how do I make another file with the same data into number fields for Date of Birth field etc? When I copy data to file that has number fields the 09252004 is changed to 9252004. Can I get reports with the correct Date of Birth in them by moving data from text file to number file?

There is data entered monthly in file and formula has been set up for January, February etc as ---quarter: Int(([month]-1)/3)+1. I would like formula for the fiscal year for April to be counted as month 1, May - month 2, June as month 3, July as month 4, August as month 5, Sept as month 6, October as month 7, Nov as month 8, Dec as month 9, Jan as month 10, Feb as month 11 and March as month 12.

Thank you

View 6 Replies View Related

Reports :: Generate Number Of Rows In Report Depending On Number In Another Field

Nov 4, 2013

I have a form where we fill in information for supply of equipment to employees.

Each item must be signed for on a printed report.

I am encountering problems trying to create enough rows in my report detail for each signature of the items supplied.

For example, on the form I will select the "equipment" - 4 hats supplied and 3 boots. On the report I want the equipment set as the group and the detail to be a number or rows which equals the number of selected items. therefore under the Hats group heading I want 4 blank rows which are made up of 3 text boxes - Print Name, Signature & Date and another group heading for boots but with 3 lines.

View 11 Replies View Related







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