Create Index Numbers In A Query
Mar 23, 2005
Basically I want to run a query that adds an index number against each record returned, however I want the index number to reset every time a name in a field changes e.g.
Date Name Index
01/01/05 Smith 1
01/01/05 Smith 2
02/01/05 Smith 3
04/01/05 Smith 4
01/01/05 Jones 1
03/01/05 Jones 2
01/01/05 Davies 1
02/01/05 Davies 2
06/01/05 Davies 3
07/01/05 Davies 4
As you can see the index is reset at each change of name.
Is this possible ?
View Replies
ADVERTISEMENT
Jun 13, 2007
I am using MS Access 2000 to handle a help desk system. Each job is given a task number and users are able to output a report of all of there tasks, with full notes.
What I would like to do is create a index front page or section which lists just the task numbers and the page number they appear on.
Can this be done or is there somewhere to perform a search on a report?
Any help most appreciated.
Dalien51
View 1 Replies
View Related
Nov 29, 2005
This is a real mind bender.
I am running a2k. I am merging two databases. table1 is in the backend database. table2 is linked to the second database.
I run an append query to add table2 entries to table1. The append fails for 96 recs saying key violation. Turns out I can rerun the append if I drop the zip code field.
I then try to manually change the zip code and receive the duplicate values in index, primary key, or relationship.
I ran a compact & repair the databases, still no go. I can't edit the value of the zip code. I import the table to a new database. Still can't change the zip code. I drop MANY of the indexes. Even the index on the zip code field. Run compact&repair. still getting the index message. I even re-imported to a new db again. Still same error message.
I may start again by importing JUST these two tables to a new blank db and see if I get the same issues. I'll keep you posted...but maybe there is someone out there who has seen this error before.
fyi-if I enter a new record, the autonumber field correctly increments to the next available autonumber field. (I say this because of another thread on this matter w/ autonumber fields and bug in A2003)
View 1 Replies
View Related
Jun 13, 2013
I am using Access 2010 32-bit on a Windows 7 64-bit platform.I have a database that I have imported existing data into. For the most part, I have eliminated duplicate entries in my Item Number field.
Obviously I have missed at least one (or possibly more) duplicates. When I try to create a NO DUPLICATES index, I am informed that there are duplicate entries.I am looking for a quick way to generate a list of values that are duplicated so I can address those and correct them.Item number field is a number field of type DOUBLE with 2 decimal places.
View 2 Replies
View Related
Apr 4, 2014
I have a situation where I have a report which I will generate to print our companies pricebook. I need an index/table of contents for customers to go to the page where a product is to look up prices. The problem is that we add and subtract products on a consistent basis.
So a new product will get added, but of course, to run alphabetically, there's no way to insert it, then renumber the pages for it to be easily found.to use a maketable query, which sorts all of the products alphabetically. Each time it is run, it will delete the previous table. I then need to have an autonumber field created to create my "page numbers". Yes, each time the pricebook is run, products can and will oftentimes get new page numbers.
So my thought is to have a macro run which creates the autonumber field to the table. This will then be the basis for the form, which will in turn utilize the "page number"/autonumber field to both serve as page numbers in the report. And of course, the table which is created each time will be the "table of contents".
View 5 Replies
View Related
Apr 25, 2013
I need to create a MemberID field that autonumbers and uses a prefix.
EG: YearJoined+0001
I want this as a the PK as well.I tried a default value Year(Now())&format([ID],"0000") but it gives me errors.
View 7 Replies
View Related
Jul 8, 2013
I am creating an access database to store customer details as well as quote information. I have created a form to input quote details that our office can complete when a customer calls to complete a quote. I need to create a form that opens as a new form every time we click on the form to input a new quotation. How do I do this? At the moment when I click on the form, the form opens but the details of the last quotation are stored on the open form.
I have no training in access at all and am self taught so far so by no means an expert.I also want to create a form that allows you to search for particular quote numbers, so if someone calls and asks about a particular quote number we click on a page that says 'search quotes', input the quote number and the form opens with all the details of that quote.
View 2 Replies
View Related
Jul 31, 2013
I have list of candidates shown in report. I need each candidate to have a unique number based on user input. And this number increases by 1 for the rest of the candidates in the report.
Example is below:
If user enters 1132 in the user input box then the numbers shown in report should be as below:
Name Assignment Number
Felicity Thomas 1132
Andrew Sen 1133
Andy Luker 1134
Similarly if number entered is 2345 then the numbers shown in the report will be:
Name Assignment Number
Felicity Thomas 2345
Andrew Sen 2346
Andy Luker 2347
View 1 Replies
View Related
Jul 4, 2007
Hi guys
thank you in advance for any idea/info!!
i have 2 tables, P.O and Invoice. In PO tbl i have an Invoice field with Index set to Yes (No duplicate)
On a form based on PO table, I couldnt enter a new record due to this so i set the Index back to NO
Now..I have a combo bound to PO table with a query taking a list serial number from another table. I want to filter away whatever serial numbers from this list that have been added to PO so i write this SQL
"SELECT DISTINCTROW tblComputer_Cabinet.[CC_Serial #]
FROM tblComputer_Cabinet, tblPO
WHERE (((tblComputer_Cabinet.[CC_Serial #])<>[tblPO].[CC_Serial #]))
ORDER BY tblComputer_Cabinet.[CC_Serial #];"
which worked fine before i removed the index
Why was it?
View 2 Replies
View Related
Sep 22, 2005
I am creating a table with a make-table query. The only trouble is that I can't figure out how to designate which field will be the primary key. Is there a way to do this...... other than creating the table, then manually going into desing mode and specifying the primary key there? I want this to be automated.
Thanks,
David
View 3 Replies
View Related
Aug 12, 2014
I'm having multiple problems with my database like things such as -
i'm currently working on the Query 2 - On the Phone database (ignore Query 1) and i want to search for multiple plot numbers preferably in one parameter prompt with a comma to seperate numbers. (this could be a multitude of numbers so i would like to be able to input as many as needed). Also when i do search on this query since the Criteria is a 'Between' Value i would expect everything between the 2 numbers input to show up - but a lot of numbers out of the range show up too - why is this? (The Numbers are like "69 to 136" and they will show up - but 1-69 and 136-170 would too
I would also like to implement the search results from Query 2 into the Form i currently have made but it just opens up a access table when the search is made?
i cannot link my database as it is too big for the server - But here are the Criteria for Query 2:
Plot No - (criteria = Between [Enter First Plot No:] And [Enter Last Plot No:])
Site - (criteria = Like "*" & [Enter Site:] & "*")
Product - (criteria = Like "*" & [Enter Product:] & "*"
The Query is the one im most concerned about , i can live without a form.
View 14 Replies
View Related
Jan 10, 2007
Ok so in excel I have some numbers that are stored as text. The reason being that they are zip codes and some begin with 0 and excel doesn't want numbers to start with 0....so when I import these into an access field that has an input mask for zip codes...will it convert these correctly since the field is a text with input mask?
View 1 Replies
View Related
Aug 24, 2014
I have 2 fields that I would like to automate if possible
One field is called "p/o number" and another field called "line no"
These fields are part of an ordering database
Let say I have 200 items to purchase form 10 suppliers
And form example 20 items from each supplier
What I do at present is put the order number on each line item and the line number
example
p/o number line no
1 1
1 2
1 3
2 1
2 2
2 3
2 4
What I want to do is just put the first po number in the required line . Put the first line number in i.e. "1" and the macro will complete all the p/o numbers and line numbers for me as per the ones marked in red.
Example
1 1
2 2
3 3
2 1
2 2
2 3
View 5 Replies
View Related
Mar 18, 2008
HelloBascially I am trying to make a query to check if certain Parameters are met over all in the table then add up records.For example i have a record set up likeBob Brown|Access Programmers|18/3/08|1Bob Brown|Access Programmers|17/3/08|5I would want to make a query compound those records up in a report (e.g the compounded values don't need to be saved just displayed)If the records name field is the same and the dates fall in a certain range then the records will be compounded together e.g the numbers being added upSo the end result for that example would beBob Brown|Access Programmers|6Because the records name and "Access Programmers" is the same and they fall within a certain date range the records are compounded togetherMy question is, Would you make a query to do that or can it be done with a report. Bascially what would be the best way to do it.:)Thankyou In Advance!
View 4 Replies
View Related
Sep 21, 2005
I have got a big data base (40mb) and i am currently trying to run a query which i need help with.
In my database i different parts which are graded by levels e.g.
Part Level
Nut 2
Bolt 1
Pipe 2
In my query i want to run it so that i will have column headings e.g.
Level 1 Level 2 Level 3
and under each heading there will be a total of the number of parts under each level e.g. under level 1 there will be a one, under level 2 there will a 2 sourcing from the above data example.
Please help!!
View 4 Replies
View Related
Apr 9, 2008
I've have used the usual code format for creating a column of row numbers for my query, but it doesn't seem to work. Sequence: DCount("InventoryID","Chemical Location","InventoryID <=" & [InventoryID]) I got this error The Microsoft Office Access database engine cannot find the input table or query 'Chemical Location'. Make sure it exists and that its name is spelled correctly.
So I tried this: Sequence: DCount("InventoryID","qexpFacilityInventory","InventoryID <=" & [InventoryID])And I got this error: The expression you entered as a query paramenter produced this error: Business Emergency Plans can't find the form 'frmMain' referred to in a macro expression or Visual Basic code
I think my code doesn't work because its a join query; so I'm searching for an answer. I have attached an image of the query builder in Access 2007 to show my problem. Also I'm showing the SQL code. Can someone help me with putting row numbers in a Join Query "qexpFacilityInventory"?
SELECT tblChemicalInventory.[Business Name], tblChemicalInventory.[Item Number], tblChemicalInventory.[Chemical Location], tblChemicalInventory.[Chemical Name], tblChemicalInventory.[Common Name], tblChemicalInventory.[Map ], tblChemicalInventory.[Grid ], tblChemicalInventory.[Largest Container], tblChemicalInventory.[Average Daily Amount], tblChemicalInventory.[Maximum Daily Amount], tblChemicalInventory.Units, tblChemicalInventory.[Storage Container], tblChemicalInventory.[Usage Purpose], tblChemicalInventory.[Annual Waste Amount], tblChemicalInventory.STATUS AS Reviewer, tblChemicalInventory.STATUS AS [Modified Yes/No], tblChemicalInventory.STATUS AS Comments
FROM tblChemicalInventory INNER JOIN tblChemicalProperties ON tblChemicalInventory.ChemicalID = tblChemicalProperties.ChemicalID
WHERE (((tblChemicalInventory.BusinessID)=[Forms]![frmMain]![ctlGenericSubform].[Form]![BusinessID]));
Thanks,
PC
View 1 Replies
View Related
Oct 10, 2005
I'm trying to create a combo box that would show the next ID number available to name a piece of equipment, as well as any numbers in the range that can be recycled.
This is in an equipment database where the equipment is named using the following convention: Division - equipment type - #. For example, a PC would be: DIV1-CPU-0001. My current drop down box generates the next number (so you can see the next ID for DIV1-CPU-0002). It's just a MAX+1 query.
However, if we have 10 PCs and DIV1-CPU-0008 was stripped and sent to recycling, then 8 is available as an ID number. I want my drop-down box to show, in that case, "8" and "11" as the options.
I've created a table with all the numbers and created queries that show which ID numbers aren't in use for each type of equipment. However, I can't figure out how to put all this in one query for my combo box.
Thanks!
View 2 Replies
View Related
Aug 26, 2005
Hello, how do i add 2 field numbers in a query together, i have the fields: "basic hours" & "overtime", and a "total". I would like the "total" field to add basic hours & overtime together.
I believe i need to use the =sum function in the query on the criteria bit, is that right?....but forgot what to do :o please help?
View 10 Replies
View Related
Mar 1, 2015
I am looking to calculate numbers in query like this if the field name in query is Unit and the second field name is amount and i want that the amount field to calculate the unit field on this criteria..Suppose if total unit is 393 so the calculation should be like this;
First hundred should be calculated with 100.00 X 5.79 = 579.00
Second 200.00 X 8.11 = 1622.00
Third 93.00 X 12.33 = 1146.69
Total should be displayed in the amount field = 3347.69
View 14 Replies
View Related
Nov 10, 2005
I have a field in a query that contains numbers and text (text field). The numbers displayed come from a percent calculation and display with many decimals ie, .99898745987245. Is there a way to eliminate the decimals with code in the query field? For example .99898745987245 to equal 99%? I can’t format the field as a number or percent because it has both text and numbers. HELP!!
Thanks
View 5 Replies
View Related
Nov 30, 2006
Hello Everyone,
Im trying to make a query which will allow me to run a query update so that all my listings will get a new random number generated for them,
Ive got it selecting any listing with a ID of >0 (so basically thats all of the listings)
What id like it to do is then assign a random number to the randsort field, (prefer a number like 0.812 or 0.342 etc etc)
To start with ive tried using the Rnd feature, but its updating all the listings with exactly the same number (though granted the number changes each time the query is run)
I see in some of the other comments regarding rnd that you may need to put a randomize statement somewhere,
Im very new to programming in access and was just wondering am I on the right track, and if so where abouts should i declare the randomize code since its in a query?
Thanks for your time and look forward to your replies
Cheers Ezy
View 6 Replies
View Related
Jun 21, 2007
I am making a query and I need to be able to determine if two number fields are with in 2.5% of each other. How would be the best way to go about doing this. I have two distances and I need to display them if there is a differenece of greater than 2.5% in them.
View 3 Replies
View Related
Apr 2, 2008
Hello again,
A while back, I asked about the now-removed function of exporting Reports to Excel. I was told that there's no way to do so in Access 2007 and that the best best would be to export the underlying Query.
I did so and I found out that the query was showing the record number of some data pulled in via combo box (which gets data from a separate table) instead of the data itself. Logically, I can understand why that would happen, but is there a way to change that so that the intended data, not the record number, is shown?
Currently:
2008.....spring.....45.....33.....222.....bookname .....bookauthor.....edition
Preferred:
2008.....spring.....johnson.....aspen publishing.....Intro to Criminology.....bookname.....bookauthor
Once this is sorted out, I can automate the export without a problem. ;)
View 3 Replies
View Related
Sep 26, 2007
I have a table with data that is similar to this:
HCP1 DATE (Fields)
-.1 7/19/2007
-.2 6/14/2007
0 9/9/2007
1.2 4/23/2006
-.3 4/4/2007
2.4 3/7/2007
0 2/5/2006
1.1 2/6/2007
Etc. There are 0's, negative numbers and postive numbers. Some with at least one decimal point. I am trying to sort the data by the highest number in HCP1 field. When I run the query in Access it looks great. But when run through ASP on the server it is only giving me the negative numbers, no 0's no positve numbers. It would return -.1 in this sample data as the first record.
Anyone know what might be going wrong on the server side of things. The query statement looks the same on both sides. (server and access)
Thanks for any help.
View 5 Replies
View Related
Nov 25, 2013
I have a report that takes numbers from a query
as an example
To be migrated - 50
Migrated - 30
Excluded 10
were each number comes from a query field..Can I add say Migrated and Excluded within the report and possibly other calculations that I may wish to include.
View 3 Replies
View Related
Jan 2, 2015
I'm creating a sales system that allows customers to place orders using a customer account. when a customer completes an order the number items in the order needs to be subtracted from the stock numbers of each of those items stored in the system.
What I have so far is zipped and attached,
The way my system works should be easy enough to understand, there are four linked tables that store information on customers, products and orders. What I'm really struggling to understand is how to take the values in the records in the Invoice-Product table and take them away from the stock numbers for the products in the products table. But only new orders should take away from the stock number when a new order is placed.
If possible I also need to be able to add stock numbers for example if a delivery comes in, and if it's similar enough could that also be done here?
View 4 Replies
View Related