Hi, I have done this before but it has bee awhile. I have set up a small database to keep track of invoices. Before I generate an invoice I go to this database and put in the pertinant info. What I want it to do is generate an invoice number every time I go to start a new record, starting with a specific number and incrementing from there. FOr example I started with invoice number 2429 so I want it to generate 2430 for the next record . Please tell me how to do this again it is driving me nuts.
I have 2 page tabs on a form, and I want an incremental number assigned to each new record on that page.
Been doing some research and this is what I came up with:
Private Sub Form_Current() If Me!tabSupplier.NewRecord = True Then Me!tabSupplier!DocumentNo = Nz(DMax("DocumentNo", "Product"), 1000) + 1 End If End Sub
The page nane is: Supplier Page Index is:0 The control to display the incremental number isocumentNo (tblProducts)
it does not work and I am getting no error message.
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".
one of my tables has a field called # of Days. the default (minimum) value for this field is five (5), which i set. however, if there is a case where five (5) days are not enough, the next value would be ten (10) since the permit is issued for 5 days at a time, and so on. can someone suggest a validation rule that only allows increments of 5, but the minimum value is never less than 5? thanx in advance! :)
I'm building an application via Access that will allow a user at my company to import a CSV file with hundreds of records, press a button that runs several insert queries which inserts some of those records into our ERP system based on criteria.Each record of the insert query must have a unique "Interchange Number" that is historically unique, ie, if I used number 1000 in the insert query yesterday, I would need to use 1001 today. I already can find which value to start with using a DMAX() function on the table where you insert the records.I need a way to give each record of a select query a unique value that is +1 from the preceding record.
When I import the CSV file, I already have Access assigning an Autonumber. The problem is the file can have up to a thousand records a day while I only need to insert maybe 10 each day. If the starting Interchange number was 1001, I would like it to go 1001, 1002, 1003, etc. If I add the Autonumber from the table I imported, it can go 1001, 1050, 1343, based on where that record was on the autonumber when it imported.
So is there anyway to run a select query and have a field on that query start at 1 and count up by 1 for each record? If I can get that I can code the rest.
I need some help with code. I can do this in Excel, but I am not sure how to do it in Access.
Here are the fields:
PoundsPerBox PoundsPerOrder BoxesToOrder
Here is the scenario: If a customer orders custom paint for their equipment, we need to total how many pounds of Powder Coat paint it takes to paint all the units (PoundsPerOrder). When we order this from the vendor we have to order it by the box which is measured in pounds. In this example, the vendor will sell us a box of white Poweder Coat paint in increments of 55 pounds. (55, 110, 165,...)
Verbally, the logic reads like this: If PoundsPerOrder is less than or equal to PoundsPerBox, then BoxesToOrder equals 1. This logic needs to be tested for each increment value (indefinately) of PoundsPerBox.
Am I making sense? How do I accomplish this in Access? And, as a side note, I need to capture and store this value in a table for future reference.
I work for an insurance company where various (and multiple) discounts or loads can be applied to a quoted premium for one reason or another.
These discounts/loads are stored in a table with a corresponding customer ID, where each row represents an individual discount/load (labelled and ordered-by a 'Step').
Unfortunately, the resulting premium from these discounts/loads is not stored in the database and are calculated on the fly by the front-end.
I have a requirement however, to store the 'new' premiums based on the stored discounts/loads for a report.
My problem is that the calculations must occur incrementally one after another, where the discount/load at each 'Step' applies to the resulting premium from the previous calculation.
The attached spreadsheet is demonstrative of the existing table where two additional columns have been added to show you what I need to calculate. 'Price_Amount' represents the discount/load in monetry terms relative to the calculation and 'New_Prem' is the premium resulting from the calculation step.
Notice that each discount/load applies to the previously calculated premium rather than the original one (Original_Prem = the starting point from which all further calculations should apply).
The full table would include many more rows for different customer ID's, where the number of 'steps' could be as few as 1 or as many as 7 per customer ID (ordered by 'Step').
Having toiled for many hours in Access to achieve the above, I am now resigned to the fact that only some kind of VBA function will achieve my requirements.
This function should take the Original Premium for each CustomerID and loop through each 'Step' applying the relative discount/load based on the value in 'Pricing' and the number type in 'Price_Type'. Once the function has calculated each step per CustomerID and has reached the maximum 'Step', it should move on to the next CustomerID.
such can only articulate the requirements without being able to convert this into actual coded logic. Nonetheless, I am in a bit of a pickle with this one and am under some pressure to create the report.
I am working on an access database for my team. We keep and maintain a trail log for different departments.
The person will send a trail sheet to us we will input the info and attach what we call Production Instructions Number in this format (YEAR-Month-001), the next trail will get (YEAR-Month-002), the last 3 digits will start over when the month changes, I would like the PI number to populate automatically when the info is inserted.
Part of my access application does invoicing. I have an invoice number table that wholes one field "InvoiceNum". On my invoice report i have the following code:
Code: Private Sub Report_Open(Cancel As Integer) '// lookup invoice number when invoice opens intInvoiceNum = Nz(DLookup("InvoiceNum", "tblInvoiceNum"), 0) End Sub
[Code] .....
Problem: My report open with groupby ClientID and ProjectNum. Multiple invoices print on the same report. If any invoice spills over to second page the Format Code runs again inserting an incremental invoice number to the second page. How can i prevent this from happening?
I have one main table containing most data, that table stores data which is identifies by a unique ID (currently 1-96000), there is also an issue number, I need another numbering system per issue (so you could have issue 166, record 26), any ideas?
Hi I obviously have a table with records in it sorted in assending order. What I need is to know how to make it add into one of the table fields the number it is in the table. IE
Name Time Position Number Mr Jones - 12:30 - 1 Mr Evans - 12:45 - 2
So if i added 12:35 it would change mr evans position number to 3 and make the new record position number 2.
I want to distribute certain materials (found in a query) to several warehouse locations in a sequential order.
So the first found material needs to be put in warehouse location 001, the second found material needs to be put in warehouse location 002, etc.
How can I number the lines in a query?
I don’t want to run a create-table-query with an auto number field because the warehouse locations are limited and every time the query runs the numbering has to start at 001.
Shall be grateful for clarifications for these two :
1. I have two fields - TheYear (set to take the current year) and another for sequential numbering. In fact I created this to replace the autonumber field. As suggested by a member I created a Generate button with the criteria as under
Private Sub Generate_Click() If IsNull(Me![NumFld]) Then Me![NumFld] = Format(Nz(DMax("[NumFld]", "[DiaryTable]", "[TheYear]='" & Year(Date) & "'"), 0) + 1, "00000") End If Me![NumFld] = Format([NumFld], "00000")
End Sub
It works fine. and when the year is changed, the numbering starts from 1 again. My question is how do I make it to auto generate the number so that the user doesnt have to click the Generate button everytime to get the number. Suggestions please.
2. Is it possible to change this sequential numbering midway i.e. to start from a different number and increment by one?
We have a part numbering system that is currently like this, 11Y22 where 22 increments by one until it gets to 99 where it then goes back to 0, once it goes to 0 the letter increments to Z in this case, now once the last three characters get to Z99, then the 11 gets incremented eg, 11Z99 will become 12A00. Hope that is clear :)
My question is, can this system be implemented into the auto numbering in Access?:confused:
Hi there I'm sure that this must be easy, so go gently on an old codger! I have a query for which I wish to add another field containing a running total of the number of records produced by the query (after all sorting etc.).
In other words, if my query produces n records, that new field would contain the value 1 in the first record, 2 in the next and so on to n.
I have created a work order application, and the process is that it takes total number ordered of an item, divides it by a factor, and then prints x number of work orders, example qty ordered 300 = 5 work orders, 4@72 and 1@12, my question is, now I want to appended the work order number with a count number, example wo555-1, wo555-2 and so on, grouping on the work order number, so each work order start again at 1. I am stumped, can anyone help.
I would like to create an expression that would number each item in sequential order in a query . I cannot use autonumber on the table because I am pulling it from SQL and do not have clearance to change the actual tables. I have been searching through this forum for the last 2 hours and have not come across anything similar to this, so I hope I'm not covering a topic that has already been covered.
Hi I am a newbie on here!!!!! Anyways, now that I got that out of the way.... I need help on my Access Database. Hopefully this isn't a stupid question..... I would like to have one of my cells in my form to automatically count from 1000-9999 when I go to the next form. when it hits 9999, I need it to start over, but not delete any of the previous entries that I have in there. Anyone willing to help me out?
Greatly Appreciated, I am sure I will have more questions!!!
I have a report that produces invoices and gets its data from a multi-table based query. The query has multiple lines for each customer and the report groups and totals them. How can I have the invoices numbered sequentially? Any help please?