I have a master table that holds all of my data. The table details what qualifications someone is holding.I would like a query that would enable me to produce a list of people who DO NOT hold a qualification.
I currently have query that looks at 2 tables that hold financial information. I am querying the data to do some adding and subtracting based off a financial class of a facility. The issue I am having is that one table may have a financial code that the other does not have but I still need to show that financial class for the facility.
My looks as follows
FROM [CashValue Link] INNER JOIN TCashValue ON ([CashValue Link].FINANCIAL = [TCashValue].FINANCIAL) and ([CashValue Link].Date1 = TCashValue.Date1) AND ([CashValue Link].FACILITY = TCashValue.FACILITY) AND ([CashValue Link].CLT = TCashValue.CLT)
In the above example student 1234 has a missing record in year 2004 which supposed to be Term2 in the previous year (i.e. 003) and Term2 supposed to be Term1 value in the following year (i.e. 004). Similarly for student 3311
I have 2 tables: one for repairs and the other for the billing for those repairs. There is a foreign key(record_num) in the billing table to match the primary key(prikey) in the repairs table. This works fine as long as the unit repair has been completed.
Now an employee wants to see records even if they are not completed and wants the rate to be $0.00 if the unit has not been completed. But by this method there is no record in the billing table.
My problem is if I have the 2 tables joined then I only see records that match both tables. Here is my SQL for the query:
SELECT DISTINCTROW tbl_module_repairs.end_user, tbl_module_repairs.pickup_date, tbl_module_repairs.complete_date, IIf([pickup_entity]="Storm","APS Storm","APS Field Tech") AS [Repair Pickup], tbl_module_repairs.mfg_part_num, tbl_module_repairs.manufacturer, tbl_module_repairs.module_type, tbl_module_repairs.incoming_module_sn,
I'm trying to make a sub form that displays the hours of an employee selected in a listbox. I've got most of it working but having a bit of an issue.
The info for thre query is in 3 tables: tblStaff (name etc) tblShifts (start and end times for days that this employee works) tblDays (a list of days names so I can use numbers elsewhere)
My query looks like this:
Code: SELECT tblDays.dayName, IIf(Nz([startTime],"")="","NWD",[startTime]) AS start, IIf(Nz([endTime],"")="","NWD",[endTime]) AS [end], tblStaff.staffName FROM tblDays LEFT JOIN (tblStaff RIGHT JOIN tblShifts ON tblStaff.staffPK = tblShifts.staffFK) ON tblDays.dayPK = tblShifts.workingDay WHERE (((tblStaff.staffName)=[Forms]![frmMain]![lst_myTeam] Or (tblStaff.staffName) Is Null));
This worked fine with a single user and some test data - it correctly displayed all days of the week, with start/end times on Mon and Tues where I had entered shift information, and "NWD" against all other days.
However, when I add a couple more employees to the mix it shows the correct info for the first employee, but anybody else it will only display days where person 1 doesn't have any hours. I haven't entered any hours for the new employees, but the query should still display Mon-Sun with NWD in every column. It shows Wed-Sun but Mon and Tues are missing.
I've tried different join types but they all come back with "ambiguous joins" error when I try to run.
I want to use a column in a query to show where data is missing in other fields.
In excel I have used this statement:
=IF(COUNTA(I5:J5)=2,"","error")
Basically, I have two fields PRICE and WEIGHT. I want a column in the query to show 'Error' (or any kind of flag) when either (or both) of these fields are blank.
I am using an Access 2010 DB to keep track of a schedule. Essentially, at least one person needs to be signed up to work for every hour of every day in a week.
Tables: Days with 7 records Hours with 24 records Workers with as many people that sign up to work the different hours Schedule signifying the worker, day, and hour which are signed up.
As of now i have a query that relates these results and gives me a line detailing the worker/time information for the slots that are signed up for.What I'm TRYING to do is to create a query that gives me BLANK worker info when there is no one signed up for a particular hour.Currently my Schedule table has the following:
What I'm looking to do is have this table matched up with another table (or query) that provides every combination of day/hour. When an day/hour combination is skipped, the query will be able to "fill in the blank" with a row. Like this:
I have created query and all my values come into the table from the query fine.
When i then go and generate the report all of the boxes are there for the data but there is no data in them. For owner and Job Id all info is there but job name, Department and a few others there is no data in the boxes.
I have an access database with several linked tables (linked to MySQL database) and several local tables. The theory is that if there's ever a connection issue, the device connected to the computer will continue logging data to the local tables. Once a connection is re-established, the linked tables should be updated with all the missing records which appear on the local tables.
I found several possibilities which I outlined below, but I've been asked to investigate whether there's a built in function in access that does this for you and use the other options as a last resort. Does access have any program feature that updates one table with missing data from another table, or will I have to write VBA code to do that? Options I've discovered:
1) Write unmatched query and insert missing data into table.
2) Create a linked table on MySQL that will link to the local tables on access, then compare the records there.The boss isn't happy with those options because he wants to keep the amount of code we add to a minimum. Ultimately, we hope that a program feature that does this is built in to access. If not, I have no problem adding code to do this instead.
The following code supposed to let me print all records OR only those where dAreaFK = myCBO currently I get an error message "Object missing".if i remove this: Or Me!cboStatsArea Is Null..from the last line the it works but only if i make selection in combo.
Code: Private Sub cmdPrintOpen_Click() 'Print open defects using R_Open_details Dim i As Integer i = DCount("*", "Q_Open_details", "dAreaFK=cboStatsArea OR cboStatsArea IS Null") 'MsgBox "The count of rows is " & i If i = 0 Then MsgBox "No Records available for print", _ vbOKOnly, "Error" Exit Sub End If DoCmd.OpenReport "R_Open_details", acPreview, , _ "dAreaFK=" & Me!cboStatsArea Or Me!cboStatsArea Is Null End Sub
I'm trying to create a single, Update Query in Access 2007 that does all of these 3 things:
Update (skipping zero-length values) Append Automatically handle missing Fields without showing any "Enter Parameter Value" prompts.
I've managed to accomplish the 1st & 2nd items on my own, but I'm stumped on the 3rd. In essence, what I'm looking for is a way of telling Access to automatically use a zero-length/null value for any missing Field(s) the Query encounters, so long as it does not involve manually modifying the Table beforehand. Automation is key. And that's where you guys come in.
Attached, is a diagram of the desired results applied to a set of sample Tables. And here's the SQL code for the Update Query adjusted to work with those sample Tables:
Code: UPDATE Table_1 RIGHT JOIN Table_2 ON Table_1.ID = Table_2.ID SET Table_1.ID = NZ([Table_2].[ID],[Table_1].[ID]), Table_1.Company = NZ([Table_2].[Company],[Table_1].[Company]), Table_1.Address = NZ([Table_2].[Address],[Table_1].[Address]), Table_1.Phone = NZ([Table_2].[Phone],[Table_1].[Phone]);
SELECT Costs.Costs_Per_Capita, Costs.Period IIF (Period = 1, (Select AVG(Costs_Per_Capita) From Costs Where Period = 1), (Select AVG(Costs_Per_Capita) From Costs Where Period = 2) AS result FROM Costs;
But get "syntax error (missing operator) in a query expression ..."
I have a query that will draw down student details who have completed a course in a given month (May for example), i would like to use this data to identify those learners who are not enrolled on a course in the next Month (June for example). There is no field that denotes whether a student has left only that a course assosciated with their ID has a completion date within that Month. There are approx 250 records.
In my head it should work something like this
1) Identify all learners who finsihed a course in May (Identify learner ID, must have a course end date in that month)
2)Cross reference these against all those who started a course in June and identify the students that have completed in May but did not start a course in June.
Is it possible to store all those who completed (May) in a table/query and cross reference those who started in June and identify of the May completions who did not start in June?
I have a relatively large database 65M, 42K records.
For some reason I seemed to have lost most (not all) of the queries I have written. However, if I go to file>database properties>contents, I can see all my queries there.
I certainly did not delete them. Any I idea of what’s going on ? I'm, using Acess 2000 on win2K. Might this be a resources / memory related issue?
I have a form that collects data, it works perfectly and writes all inputted data to the table. I have made the same form but using the data web page wizard.
It works fine but when i look at the table, some of the data is missing. there are 12 fields to complete, (all drop down boxes) I have one table which contains the employees ID number and name.
When the id number and name and picked from the drop down box on the web page, they are listed and fine. The record gets added and no problem.
However, go an look at the data in the table and for some reason the employee ID number is present but the name field is blank?? It has not copied the data across.
Even more confusing (currently a test system) if i delete all the data in the table, it works for the first entry, i.e the web page populates the name field but only for the first entry. After that the name field remails blank.
Any suggestions? I have already deleted and re added all the table fields that relate to name and id number and still the same error. I have used the wizard to make several pages and the same problem with all of them. I am baffled why it just refuses the one field and all the others are fine.
Hi! I'm new here and have a little bit of experience w/ access...
I have a problem... I've created a form in my db but when I go to view it (not in design view) the information in the detail area is not there? The problem is not unique to this db either, I have this problem in another... Any ideas? All help is appreciated.
I have system that developed by using Ms Access which has been used for 2 years. But last week, data in one of my table missing in the half way when user do the data entry. There is header table and the details table in the form. All record of the header table were gone but the details record was not problem.
Why all data in table were missing? Please give some guidance.
I am a beginner using Access 2007. The custom written program that I am using has a minor glitch. The report has a subform inside the main report. In this subform is a form header, detail, form footer. The information that is entered into the main report that transfers to the form header, detail, and form footer works and that data is saved with no problems. When I go to create a pdf file from this report all the data transfers to the printed pdf except the information in the form footer. I have looked at the property pages and compared all the properties and they are all identical.
Below is a screen shot of the report in the design view. The areas circled in red are the data that is missing from the pdf when printed. The area in green prints correctly as well as the main body of the report. We insert comments in the comment section and also type initials in the signature section but this do not show up when printed in the pdf. The database saves the information that is input but does not print it. Not everything in the company has access to the database so this is the reasoning for generating a pdf so that it is placed on the company drive for everyone to see.
I have a query where I am geting the last 4 digits from an id. However my query when it returns the results misses out the leading zero from the results. For instance if I had an id of 12340567 the query should return 0567 but instead it returns 567. This is what I am using:Max(Right([Employee]!
I have two tables table1 his a master list of companies that I have already delt with table2 is a list of companies that I have delt with as well as new companies and I allow for multiple instances of company data to be in table2
table2 my have several records refering to "ABCD Inc" but table1 will only have it once
If new companies show up in table2 how can I get a mass copy of all the companies that are in table2 but not in table1 into table1?
I have a query which combines several linked tables, the query has about 10 columns, I need to show only the records which have one or more empty fields.
Some records may only have one missing field others may have several.
I would like to know how to display a msg box for missing or duplicate information when entering data into a form. My database keeps track of call accounting codes and the code is the primary key index field. I use macro's for all of my automated tasks such as finding codes, filtering for available codes and such. What I want to do is to display a simple message when adding a new one to the database if they forgot to enter the code and if they did enter a code if they entered a duplicate. The default error meesage tells them there is a problem but they won't know how to fix it. I know I should use the Before Update and After Update but I am not good at writing the vb code. I found some code in one of the the threads and copied it and changed the field names but it failed. I need a simple message like "You did not enter the Fac code" and "The Fac code you entered is already in the database please check your information." The field name of my primary key is "Fac" Thanks in advance for anyone that could help me with this.
When i preview, i see all data just fine but when i save a PDF of my report, i am missing some data in the report. That data is rather important because its the quantities and size of my items in my Purchase Order Report.
I have all my data sitting on a server in SQL. Within Access, I have linked tables pointing at SQL tables. I display the data on an Access form. Somewhere in their it is dropped a few records. This system is used for in and out processing and occasionally misses a few individuals. Could this have anything to do with the method in opening the table, ie dbopenTable vs dbOpenSnapshot.