Once the selected item had been entered, i want the Current_Balance of previous entry of that item to be forwarded automatically in Previous_Balance field. Is it possible? I have at least 100 types of items.
I'm creating s simple database to track my printer toner supplies, what i want is that..every time I select a date (using date picker) it will automatically deduct 1 from the total number of toners on stock. Right now, i have to input 1 in a field and it will update the remaining toners.
I need to add some code to our access 2002 database to test incoming files for bytes, zero byte files in particular. Our system will then pick out the zero byte files for emailing to our customers. Can someone provide code for testing for bytes or provide me some direction on this matter? Thank you!
So I found this video (youtube.com/watch?v=FTjyuSTcTII&spfreload=10) and followed it to do a query for all upcoming birthdays. The video shows how to do it for the next two months and I tried to modify it just for the next 7 days. When I tried to run it, I got "Date type mismatch in criteria expression" error. I tried putting it back in the criteria she had, but still got the same thing.
At 6:53 you can find the code she used for the first table (basically asking when their next birthday is) and at 9:57 is the code for the criteria. Below is my modification.
After looking at the replies to my post on the above subject, I realize that one needs to be an expert programmer in VB, SQL etc. to design queries/forms to filter records year-wise for all type of record operations. I know nothing about programming. So I have used these codes (of course, with the help of this forum) :
Private Sub Form_BeforeInsert(Cancel As Integer) If IsNull(Me![DyNo]) Then Me![DyNo] = Format(Nz(DMax("[DyNo]", "[tblAllDet]", "[TheYear]='" & Year(Date) & "'"), 0) + 1, "0") End If Me![DyNo] = Format([DyNo], "0")
If DatePart("m", Now()) = 1 And [DyNo] = 1 Then
Backup
Dim db As Database, rs As DAO.Recordset Set db = CurrentDb Set rs = db.OpenRecordset("tblAllDet")
db.Execute "DELETE * FROM [tblAllDet];" rs.Close db.Close
Else End If
End Sub
First, with DMax, my DyNo field is reset to No.1 on change of year. Then, ‘DatePart’ code looks for January and DyNo.1 and does Backup (a module) of existing records. Lastly, all records in the current DB is deleted so I get a blank database for the new year.
For the previous year’s records, I can rename the backup file year-wise and use.
I have tested this with dummy records and changing system date. I didn’t face any problem. However, I would like the experts of this forum to have a look at the above codes and point out any flaws. Thanks in advance.
What is the usual way to store the weight in a Bill of material database? Do you store the weight for each assembly and each component or only the weight of the smallest components (where the weight of each assembly is calculated by adding the weight of each component)? The way my table is set up just now only the weight of the cast component and screws are recorded and no values are recorded for the assemblies, I just want to make sure that this set up is apropriate as I wouldn't like to redesign my table once the system is up and running.
I'm new to Access (2002) and have been trying to learn by reading books, posts, forums and practicing with models. I've set up a database for inventory, primarily to track the cost of goods sold as raw material costs change from month to month. So far I have tables for raw materials, container sizes, suppliers, and finished products. But I have a problem - in some cases a finished product is also a raw material, so cannot appear in both tables. (Let's say we make cookies and we make ice cream, and we also make ice cream with cookies on top as a third/separate finished product!) Should cookies have two records ('CookieFinished' and 'CookieRM') and can they be linked together so cost is determined before it's part of another? Is there a better way? Thanks in advance!
I've tried searching the forum to no avail, I have a table (tblBarcodes) that has two fields, Barcode & Material The Barcode field is already populated with specific numbers, but what I need to do is when I enter a new material on my form it will assign it a barcode from the tblBarcode and then append the Material code to the that table against the relevant record.
I'm trying to create a report for my organization that sums the amount of material used by date. For example, I have five separate locations in my organization that all consume the same material. It gets reported separately by location. I need to know the total material consumed each day. Then I need to sort that daily total from largest to smallest quantity used. I've tried to do it in a query, and also by summing/grouping in a report. I thought this would be fairly straight forward, but no success as yet.
Need to generate a unique reference number each record wise while data entering by a form. How to do this by using a command button ? After entering all fields related to the record, when click on the command button, unique reference number for that record need to be generated and save with all other data of the records. in a later event, need to recall the record by using this reference number and also need to make relation ship with some other table by using the reference number.
In my Access forms, i display data by month wise; and i want to give the conditional formatting with two condition;
If date of today is greater than target date for that month and if got value more than 0 - Red color If date of today is lesser than target date for that month and if got value more than 0 - green color
Target date for every month in available in a separate table.
Finally got my DB straight so I am not using calculated fields however can't figure out the best way to handle the Combo Box so I do not show closed records ( Item checked out and item returned).
Please see the attached table of materials checked out and materials returned. How to setup a query so that if an item has been returned and matches the item checked out, Both the original check-in and the matching return records are filtered and not displayed in the Combo Box.
Also, I am a little worried about partial returns as when an employee only returns half the amount.
Maybe a strange question but what is the best way to display access forms in a PowerPoint presentation or in printed material. If i do a print screen and then tidy it up the resolution is not great. Any ideas
I have a form that could have duplicate material descriptions , is it possible to have on that form a field that counts the number of line items for that material and when the material changes the new number will appear .
I have a form that simply lists the items: DEPARTMENT_NBR and DEPARTMENT_NAME
In the table: DEPARTMENT_TBL
When I edit the field DEPARTMENT_NBR and it is in error (must be between 01 and 99) I want to put out a message in a MSGBOX and SetFocus back on the DEPARTMENT_NBR.
I coded the MSGBOX with vbokonly and then DEPARTMENT_NBR.SetFocus, but after the message displays and enter is hit for the ok the cursor jumps to the DEPARTMENT_NAME on the current line. Is there a way to get the SetFocus to work properly on repeating items like this? I can never seem to get them to perform the same as they do on non-repeating items.
Thanks for your help.
HERE'S THE EXACT CODE: If IsNumeric(DEPARTMENT_NBR) = False Then If DEPARTMENT_NBR <> "00" Then MsgBox "DEPARTMENT NUMBER must between 01 and 99.", vbOKOnly DEPARTMENT_NBR.SetFocus GoTo DEPARTMENT_NBR_EXIT (exits the paragraph skipping other checks) End If End If
Also, is there a way to look at a specific item in a list like that? IE. I want to reference the 3rd row's DEPARTMENT_NBR. Thanks.
I am creating rent software and I would like to do a running balance in a report.
In the table there is a field called amountPlus and amountMinus
Record one might have $10 in amountPlus making the balance $10 Record two might have $30 in amountPlus making the balance $40 Record three might have $20 in amountMinus making the balance $20
Having both fields is critical as they are displayed in the DR and CR columns respectively on the report.
(yes I know I could have called the fields DR and CR but I am financially stupid).
The report is displayed in date order, but the transactions are not necessarily entered in date order.
How can I do a running balance on a report?
It needs to take the previous balance, and either add or subtract the value depending on if the value is sitting in the DR column or CR column.
I have a table of three columns (although there are other non-currency columns in this table) but I would like the balance column to show the balance of buget column less total expenditures:
hi all, i m having a problem with a simple inventory system. The problem is that i have a query which calculates sum of 'Debit and credit' as 'Balance1' for each row. Now what i want is to add every 'Balance1' to next sum of 'Debit and credit'. e.g.
Debit Credit Balance1 Balance2 a b a+b (a+b) c d c+d c+d+(a+b) e f e+f e+f+c+d+(a+b)
I have a query that have three columns invoice number, tran number and amount. What I would like to do is to sum the invoice number if they are equal. example:
I have a banking system, and I need to be able to show the balance as each transaction is made. This is what I have so far: SELECT tblTransactions.lngTransactionID, tblTransactions.lngAccountID, tblTransactions.datDate, tblTransactions.txtType, tblTransactions.curAmount, (SELECT Sum(Iif([txtType] = "Deposit", [curAmount], 0)) - Sum(Iif([txtType] = "Withdrawal", [curAmount], 0)) FROM tblTransactions AS tblTransactions2 WHERE tblTransactions2.[lngTransactionID] <= tblTransactions.[lngTransactionID] = curAmount) AS Balance FROM tblTransactions WHERE (((tblTransactions.lngAccountID)=[AccID?])); Although the WHERE clause is just for testing, in the real form, I am using a filter to only show records for a particular account.
The problem with this code (I think) is that the subquery is carried out before the main query's WHERE clause, so the balance is calculated on all records, not just the ones for a particular user - so if User A deposits £10, then User B deposits £10, User B's balance would show as £20, which is not the case. I have done some research, and I think the soloution might be in 'Correlated Subqueries', although I am finding learning about them a bit out of my depth.
Hi All. I have Request, Device and Receive table. All table has DeviceID. I create query to calculate total amount of each type of devices which was requested by link Request and Device tables. And query to calculate total amount of each type of devices which was received by link Receive and Device tables. I would like to create Balance query to calculate: Total_Receive - Total_Request = Balance If devices in Request and Receive table is the same result is correct. But if in Receive table add new type of devices I cannot see amount of new device in Balance query. How to fix that problem? Thanks.
I haven't been on for a while. so hello everybody.
I am trying to keep a subtotal in a table. there is an index (actually its formatted text, but its a number and i can converted i.e. cdbl()). I was thinking that i should create one query with dmax in one column and and then use another one to show the value plus the previous value.