I have been working on a Query to sort through a list of companies. I am trying to query the company name to include ALL entries that have the include key(from another table) anywhere in their company name... It is supposed to exclude all entries with ONLY the exclude key(from another table)... If it has the exclude key AND the include key or neither key then the entry should be included... Then it is supposed to use all of the entries added from the previous sorts and include ONLY the entries where the zipcode matches one from a ZIPCode list.
Below I have listed the tables with their variables and my attempt on the query:
Include Table (tblinc)
ID
Inckey
Exclude Table (tblex)
ID
exkey
List Table (list)
ID
Company
Address
City
State
ZIPCode
…
ZIPCode Table (ZIPCode)
ID
ZIPCode
Query withZips <--- my attempt... doesnt work 100% ALOT OF REPETITIVE ENTRIES
SELECT DISTINCT tblinc.inckey, tblex.exkey, ZIPCode.ZIPCode, *
FROM ((list LEFT JOIN tblinc ON list.company Like "* " & tblinc.inckey & " *") LEFT JOIN tblex ON list.company Like "* " & tblex.exkey & " *") INNER JOIN ZIPCode ON list.ZipCode Like "*" & ZIPCode.ZIPCode & "*"
ORDER BY inckey DESC , exkey;
This has become urgent... If you can help, please respond asap...
I have been working on a Query to sort through a list of companies. I am trying to query the company name to include ALL entries that have the include key(from another table) anywhere in their company name... It is supposed to exclude all entries with ONLY the exclude key(from another table)... If it has the exclude key AND the include key or neither key then the entry should be included... Then it is supposed to use all of the entries added from the previous sorts and include ONLY the entries where the zipcode matches one from a ZIPCode list.
Below I have listed the tables with their variables and my attempt on the query:
Include Table (tblinc) ID Inckey
Exclude Table (tblex) ID exkey
List Table (list) ID Company Address City State ZIPCode …
ZIPCode Table (ZIPCode) ID ZIPCode
Query withZips <--- my attempt... doesnt work 100% ALOT OF REPETITIVE ENTRIES
SELECT DISTINCT tblinc.inckey, tblex.exkey, ZIPCode.ZIPCode, * FROM ((list LEFT JOIN tblinc ON list.company Like "* " & tblinc.inckey & " *") LEFT JOIN tblex ON list.company Like "* " & tblex.exkey & " *") INNER JOIN ZIPCode ON list.ZipCode Like "*" & ZIPCode.ZIPCode & "*" ORDER BY inckey DESC , exkey;
This has become urgent... If you can help, please respond asap...
Hello! i have created three tables and inserted different records in them. I want only "genes" records from table 1,2 and 3 to be shown. The problem I am having is that when I design the query and ran it, it shows me all the possible combinations of records instead of showing only 1 record.
Table 1 - Number - Population - Genes Table 2 - Number - Genes Table 3 - Number - Genes
Table 1 - Records ============== Number 1 - India - AB48 Number 1 - Pakistan - AB35 Number 1 - South korea - AB48
Table 2 - Records ============= Number 1 - BD34 Number 1 - GF45
Table 3 - Records ============= Number 1 - HG65 Number 1 - LK98
SQL ===== SELECT Table1.Number, Table1.Population, Table1.genes AS Table1_genes, Table2.genes AS Table2_genes, Table3.genes AS Table3_genes FROM Table3, Table2, Table1;
Now the question is that either I need to use Criteria or Filter to show the each record from the table. The problem I am having is that when I run this query it shows me all the possible combinations of each record from the table.
I want to show only the records which are in those fields and nothing more or less.
Could you please help.
SIZE="1"][Please note: The database I have shown here is an example and does not reflect my personal database however I have made an example to show what i am trying to achieve here][/SIZE]
I am needing a database that will help to manage employee leave (holiday) requests. I have one but the current design is a bit...... well, you know.
Leave Limits are (presently) applied by one table:- tblLimit ------- payWeek workType (twentysix work types some common to all sites, some apply only to one or two sites) LimitSiteA (three sites) LimitSiteB LimitSiteC LimitAllSites
So, several "faults" are immediately apparent:
LimitAllSites is ALWAYS the sum of LimitSiteA+LimitSiteB+LimitSiteC so clearly shouldn't be there, and I don't even want to talk about that....
Also , no primary key, repeating columns... uh-oh! Therfore.... tblLimit ------- limitID (PK) payWeek (date/time - always a Wednesday, our payWeek begins on a Wednesday) workTypeID (FK to new table tblWorkType) siteID (FK to new table tblSite) Limit (integer)
However....with just a brief investigation, it transpires that of the 1600+ rows in this (current version) table, there are only 69 unique sets of limits (ran a Unique Values query, excluding the PayWeek).
So, what I do want to talk about is not having to add in a table row for each WorkType for each PayWeek (for each site- with the improved design). I want to apply a general set of limits, with effectiveFrom and effectiveTo dates, per Site/workType combination, which should automatically populate out 80 weeks into the future (historical records are not required - it is just to help plan future leave) and then cater for the exceptions by "adjusting" the general limits in one of two ways: 1) every day over a date range (e.g. every day between 15NOV05 and 15DEC05, decrease the limit for worktype Z in Site A by 10 percent of the BASE* limit). 2) every nominated weekday over a date range (e.g. every Friday in December 2005, increase the limit for worktype Z in Site A by 20 percent of the BASE limit).
*the two adjustment types need to be independent, overlappable, and have a cumulative effect.
e.g. for the above, if the general limit for type Z of site A were 100 14 NOV --> limit 100 = 100 (no adjustment) 15 NOV --> limit 100-10 = 90 (adjustment per #1) . . - repeat concept as above . 30 NOV --> limit 100-10 = 90 (adjustment per #1) 01 DEC --> limit 100-10 = 90 (adjustment per #1) 02 DEC --> (Friday) --> limit 100-10+20 = 110 (adjustment per #1 & #2) 03 DEC --> limit 100-10 = 90 (adjustment per #1) . . - repeat concept as above . 15 DEC --> limit 100-10 = 90 (adjustment per #1) 16 DEC --> (Friday) --> limit 100+20 = 120 (adjustment per #2) 17 DEC --> limit 100 = 100 (no adjustment) etc
It gets dirtier ! There are two broad types of leave - general - for which the limit is determined/applied at the (site+workType) level, and "long service" for which the limit is to be applied at just the site level (workType has no bearing).
I was OK up until it got "dirtier" - now I am not so sure....
I was thinking...
tblLimit (base limits) ------- limitID (PK) workTypeID (FK to new table tblWorkType) siteID (FK to new table tblSite) limit (integer) effectiveFrom (date/time) effectiveTo (date/time)
Does my base limit table store WorkTypeID, but as null when the record relates to "long service" leave, and as a valid WorkTypeID when the record relates to "general" leave ? If so, is it of sound design to derive the broad leave type from the "nullness" of the workTypeID, or is it recommended to store that separately?
Similar questions relate to the adjustment table, for both WorkTypeID and WeekdayID...
I have a table in access which is updated weekly; I need to create two tables from this updated table.
1st table will consist of all the new entries for the current week
2nd table will consist of all the entries from the previous week - an amalgamation of all the entries which are not from the "current week" (table) For example; the table below shows the two entries from last week.
ID Name
1 Adam
2 Ben
This week I have three new entries New entries
ID Name
3 Charles
4 Richard
So when I run the same query next week I will get something like this.
Old Entries ID Name
1 Adam
2 Ben
3 Charles
4 Richard
[code]....
How do I get a query /queries which divides up the weeks new entries and also all the old entries.
I am looking into a database that has become very large (20,000+ entries) and access only allows me to look at the first 10,000. I am sure there is an easy way to check this out, but I am new to access, any help would be appreciated. Thank you.
is there a way to total up the number of rows i have in a table/query and have that number show up on a new seperate row kinda like the way sums are shown in msexcel. using access2003 btw, thanks
hello, I have a Database table that was pretty big, there is a little over 18k entries, so many that the form I was using won't display them all, so I had to split it into several tables, and made forms for each, now the database users want to make a mailing list out of all these different tables, they want to be able to display the entries from sertain fields with checkboxes and not others, but I can't figure out how to make a query and/or report that will look into all the different tables and pull information from all of them to make into one. In case that wasn't clear, basicaly I have: DB A-H DB I-M DB N-S DB T-Z
and I want to make a mailing list that will look into all the tables and print only those which have the "member" field check box marked. is there any way I can do this? do I sound stupid for not being able to figure this out? I've tried google but can't get any information that helps me, maybe I'm typing the wrong thing. if anyone can help it will be greatly appreciated
I have a small access db in a network which has started to crap out far too often lately. The main table records job entries and inserts a date stamp. Every now and then, an entry has a ridicuous ID (auto inc field) and/or a bad date stamp and i can't delete the record (instead i have to output everything to ecel as best i can, reimport it to a table and reset al the fields..)
i don't know what the problem is but i'm wondering if access writest to a log file somewhere (that might help) or if there is a way to make it do this?
I have an assesment and need to create a database, I'm just starting with access and I need some little help if anyone has time.
I'm doing the database for an interim managment company and i have problem with the experience category. Basically because every candidate has got at least 3 or 4 different experiences, I don't know how to design the table. All I know is that I probably will have to create a separate table for this.
It is a many-to-many relationship. When I open a table and enter a record there is a small + sign that allows me to open up the rows from the other table to enter directly into it. Can this be turned off? Also I can enter more than one record through this way. I only want one entry in inf_Ground, inf_Notes and inf_Entries for each HorseName. How would I do this? As you can tell I am completely new to Access and trying to learn. Thanks :)
I am trying to set up a query which will filter out the 10 most recent additions by date.
My table contains a 'Title' field and a 'Date Added' field. I am trying to get the 10 most recent titles up in a query so I can then create a report based on this.
So far I have managed to single out the most recent date simply by using the MAX function but am a bit lost from there on..:(
Say I have table called "project" that hold info like project name, project date, # of project, etc.
And I have a table "employee" that hold info like name, salary, # of employee, etc.
Project and employee are linked together ( many to many ) on a junction table. Basically "# of project" and "# of employee" are connected in a junction table.
As such it is easy to add or remove people off a project.
However many people are present in nearly all projects. As such I'd like to make it so that each time a new project is created, it assign those people to the project by default.
hello, Currently i have a database that holds information about computers. Each computer has a Service tag and is associated to a person. I need to be able to prevent duplicate service tags from being entered. I am using indexing and don't allow duplicates from the table design view. But, if a duplicate service tag is indeed entered, i want to inform the user who that service tag currently belongs too without having to search through the DB manually. I need then to give the user the option to delete the duplicated record they just entered or change the service tag that they just entered. Thanks. Jared
I have two forms "Enter_details" and "sendemail" on typing txt in "enter_details" forms txt field " checksum" i want it to be updated in "BODY" field of "Sendemail" "SendEmail" form may be open or may not be open. I put this code on "Sendemail" but its not working plz help
Private Sub txtBody_BeforeUpdate(Cancel As Integer) [txtBody] = Forms!Enter_Release_details.[Checksum] End Sub
I currently have a report that is driven by a combobox. I was wondering if there's a simple way to create a report for each of the entries in the combobox through a "All" combobox entry. (i.e. instead of selecting each entry, one by one)
i'm building a MS access DataBase for my customer. in between i'm always testing if it works fine (VB code, DB connections, etc.). But at the end, i would like to have DB empty of those test entries.
what is the best and savest way to delete these entries (so non of the traces are left behind)?
So I have 2 tables, the first is for "open" orders (where entries get edited changed and deleted), and the Second is for "finished" orders (where once an order is completed it should move from the open orders table to the finshed one where it will no change and will remain for futre reference)
I need help with the transfering part of this problem. I would ideally like to make a form that allows you to pull up the info for the open order then edit it to finally add the finished order to the other table. Im not sure where to start on this one.
On our database, we have a form that has 2 calendars. A start date and an End Date. The users fill in the name, and a couple other fields. Then select the start date, and end dates.
When they hit submit, the form enters into the table this info for each date in-between the start and end dates. For example if the users enters they will be taking vacation, then they enter 8/1 as a start and 8/10 as a end date. It will make an entry for each day. This works pretty well for us.
But I would like to improve it if possible.
Let say, a user a month ago made an entry that they would be work 8/23 at home. So in the database it has 8/23 at home.
Well, this week they decide they are going to take a vacation 8/21-8/25. So they make the new entry with start date 8/21 and end date 8/25. The form enters all the info just fine.
But if someone runs a report they see 8/23 at home, and also 8/21, 8/22, 8/23 ect on vacation. So gets a little confusing to where they actually are
So I was wondering if there is a way, for the database to prompt the person making the entry, that there is already an entry for 8/23 and ask if they want to delete it or save it? Then continue on creating the entries for the rest (8/24 and 8/25 in this example?).
Has anyone seen something like this? I was going to search, but not really sure what to search for on the forum.
SELECT TOP 10 tblPortCallList.Port, tblPortCallList.Arr_Date, tblPortCallList.Dep_Date, tblPortCallList.Security_Level_Ship, tblPortCallList.Security_Level_Port, * FROM tblPortCallList ORDER BY tblPortCallList.Arr_Date DESC , tblPortCallList.Dep_Date DESC;
As shown, it picks the top 10 entries in a table.
Is there a statement, which can choose specific entries in a table, in stead of the top 10? E.g. entry number 2 in a table? I have three text boxes, which need to show the previous port of call, arrival date and departure date. The table in question is sorted after arrival date and then departure date.
How do I set my table to sort all entries by time? I have Auto Date formatted for a date field but I have a time field that needs to be sorted in ASCENDING order so that any entries are sorted by time.
This is a phone log file that calls need to be returned in the order received according to our phone system.
I'm new to Access and databases so my question might seem dumb, but I need some help figuring something out. Well, I have this database where I'm storing information from different charities. So I created a table with their name, address, phone, contact person, and many othe things. Now I need to create a field with the services that they offer. Each charity could be able to offer more than one type of service. So for the services field, I cannot create a drop down list because that only allows me to choose one service. So what would be the best way to allow the user select more than one kind of service offered from a list and then be able to search that with a query? I have a list with over 50 different possible offered services and each charity usually offers 2 or 3 different services.Thanks