Hi,
I'm very new to Access DB developing, but I'm learning loads, thanks to this site.
What I'm trying to do, and it's driving me crazy, is the following:
I have a Table that has to fields (Total Daily Weight) and (Total Yearly Weight) and I have a field that calculates the percentage of yearly weight based on the total daily weight.
Now I know you're not supposed to store calculated values, so my question is..How do report on this calculated value?
A little more backround on the database:
The Database tracks waste for companies. They supply me with a total for the year, I weigh the total for the day, and then calculate to % and report on it for them....The problem comes when I go to print a report...I don't get the calculated % of yearly waste..
I keep reading on here that it should be done in a query? Can someone please guide me what I should do? I can put a copy of the DB up if it helps.
Any help would be appreciated.
I am currently running queries from a table and I get a list of part numbers and the totals. I would like to collate this into one row for each material instead of multiple - so essentially it would be like using a pivot table and summing the totals.
So I have a Form with 3 fields. 2 Date fields (Beginning & Ending) as well as a combo box (CName). There is a button (Filter).I want to fill in both dates and select from the dropdown box. Onceeach field has a value then it will send a msgbox saying there were "# of records" between the 2 dates by CName
how to combine 3 field into 1. For instance. I have a customer table with company name, branch, floor, department. then i am gonna create a query called customerextended and combine all these 3 field so that I can select them in the combobox.
I have a sample here but I just dont know how to edit it...
I have an old ERP system. The upload function is one line per value. So if I want to upload 7 models I need 7 lines, not one line with Qty of 7 however my source system sends the data as one line with Qty of 7
so in this example line 1 is fine. But line two needs 7 lines, and line 3 needs 7 lines and line 4 147 lines etc etc etc.so this is how the first three lines would look in the query.
I have a form for testing purposes only it is named "Navigation Form". It has a tab called WorkingInitial. Within WorkingInitial I have a form called QueryTester. With a list box called List0.
Basically I want to click on the tab and the query to automaically filter based on the criteria I create. I dont want to have to create a bunch of forms with each seperte query. I want VBA to modify the Query.
This is what i have an I have no clue why it doesnt work or what I am missing.
Code: Private Sub WorkingInitial_Click() Dim strSQL As String List0 = strSQL strSQL = "SELECT * FROM [Table1 Query].[My.StatusInitial] WHERE StatusInitial = 'Working';" End Sub
I got a large transaction file with deplicated records!! For unit price checking, I need to copy the last 10 unique records to another file with the same criteria but price is not the same as the current checking record.
For instance, I got 5000 records with around 400 records unit price is not the same as history. For each checking, I needed to copy the same criteria historical records to a tempory file and then delete corresponding duplicated records first, following by another deleting action only to keep the last 10 records according to date field.
How to get the last character of the string in query?
I have a table name PlateNo and I want to get the last character for registration purposes.
Ex. ZMD-123 - I want to get the number three(3) and if its possible every time the user types the last digit in criteria it will show all plate number ending in the entered number.
I have a parameter query where user enter the department number to get their info. I want instead of entering the department number, a list box pops up and ask to select department as parameter and run the same query.
I am using Access 2010. I have a database that on a form uses a multiselect listbox. That part works just fine. The list box is for selecting additional people to email. Now I have had no luck with returning just the email address that are in a hidden column (the persons actual name is seen and "selected"). The names come from a separate table and is used as a forgien key. On that same table are the indivuals email addresses. What I did was loop through to get all of the ID numbers I am getting from the list box (the ID numbers are stored in the table that the form is based on).
Once I have all of the ID Numbers I thought that maybe there was a way to retrieve all of the email address associated with the ID Numbers. This is what I have so far. I know that AllQuery returns the first email address from the list box. I just have no idea if the query is returning more than one record, or if it is how to then go to the next record. I have tried a few things with little to no success.
Code: Dim ListItem As Variant Dim AllItems As String Dim AllQuery As String For Each ListItem In Me.EmailAdditionEgineers.ItemsSelected AllItems = AllItems & Me.EmailAdditionEgineers.ItemData(ListItem) & " or " Next ListItem AllItems = Left(AllItems, Len(AllItems) - 3) AllQuery = DLookup("EmailAddress", "AdditionalEmailRequestQuery", "[ID] = " & AllItems) & ";"
I have table tblLog set up to track logging on and off. All I am tracking is the date and time the user logs on and logs off. That's pretty simple to do. When logging on it appends the userid, date, and time to tblLog. When logging off, it updates the logoff date and time for the matching fields.
What I need to know is this. If a user closes the database without using the appropriate buttons within the program, such as Ctrl Alt Del, or right clicking and using the Close command, or if the power shuts off, or whatever, is there a way to get that last update query to run...
With the following VBA code, I'm trying to select the text value from a textbox and fill that in a query to select the code from a person. (a password only login).
However, I'm getting a run time error 3078 at the '' Set rs = db.OpenRecordset("strSQL")'' line.
Code: Private Sub Tekst6_AfterUpdate() Dim strSQL As String Dim strBarcode As String Set db = CurrentDb() 'strBarcode = Me.Tekst6 'MsgBox strBarcode
I would like a query to run, depending on a date..If the date in [Txt_Date_Account_Opened] is between todays date, and within the last 30 days.do CurrentDb.Execute ("Qry_Append_Units")else a msg box stating "account is not yet open"
I need to export a Query to XML to be used in a PhP script.However the XML output format differ from the example I have.The example is far more simplistic so I need to get rid of the extra stuff.I assume that I would need to use a schema to correct this but I've been unable to get the syntax correct.
I am quite new to MS access and started to develop a small database for my practice. I have made four tables that are for Patient details, their doctor detail, their problem and their treatment. I have successfully created form to enter the data.However I an unable to proceed, now I want to create a discharge letter which will be addressed to the doctor (based on the tables described above)
I want to make this in a way that if I enter the patient details i-e date of birth, ID and / or name a letter is created based on the tables above. I also want this letter to be saved for future use. how to design that letter and should it be a query or report.
I'm using Access 2003 and have an issue with getting a zero value from a query (or) form that has no records. It works great as long as there is at least 1 record but not for a 'no record' issue.
I've used Nz; IIf, and IsNull and the codes work providing i have at least one record with data in it, but I need it to show as a 'zero' if there are no records showing in the table
This is for a form, or query and is the end result from a Sum([---]) equation
1. This code gives me a Zero but if there is data available, it still shows a zero and doesn't take the real value (i.e. $35.85) =IIf([Daily WO Query-mastercard].[Form]![TotalPayment],"0","")
2. This one will show a vaue if it has one, but an error is it doesn't: =IIf([Daily WO Query-mastercard].[Form]![TotalPayment],([Daily WO Query-mastercard].[Form]![TotalPayment]),"0")
I'm trying to split out the first name from a GivenNames field which contains first and middle names. Some values in the GivenNames field have just a first name. I've tried the below formula, but still get some #Error responses where only a first name exists in the field.
My formula: Given Name: IIf(IsError(Left([GivenNames],InStr([GivenNames]," ")-1)),[GivenNames],Left([GivenNames],InStr([GivenNames]," ")-1))
I just started my internship a couple weeks ago so I am still relatively new, but here's my problem...I have created a query to run the weekly statistics for my data but one column continues to show multiple times. I want the "Left in Estock" and "Left in Estock Line Items" to only show once, instead of all the way down the side. Check out the attachments.
This is a very general question, but a problem that I hit repeatedly in my low level database work - I am not trained in databases at all, but have to use them to get on.
I find that when basing forms on select queries that are stacked on each other - (ie one query shows the results of two tables, that query then is joined to another table in another query and so on) that at some stage the query results become uneditable.
I cannot see why this happens. Is there a simple database rule that I am not adhering to here? Is there a maximum number of tables that can be joined in queries and form the basis of editable datasets in form view.
I have a query that pulls up the sum of records that holkd a date value between two dates, and groups them by the person that created them.
How can I show these results in a graph? that will update every time a user clicks a buttons (as they may wish to change the two dates to search between)...
Am trying to export an excel (97-03) file from a query I have. Some of the columns have exported as number values (as its linked via unique id's). I want it to export certain columns as the text columns. I have tried the lookup route but it doesn't seem to make a difference.
I have a form based on a query. I've disabled "Navigation Buttons" on the form and am trying to recreate their functionality in a little more user friendly way. I've created next / previous record buttons and have those working great.
I'm now trying to re-create the record counter / tracker. I'd like to setup a box that shows which record I'm on (this can simply be based on the order the query returns them, the same way the navigation buttons does it when they are enabled. ), and how many records there are total in the query.
I tried messing around a little bit with =DCount but wasn't able to make it work I suspect because I'm counting the number of records returned in a query, not in a table.