My problem is that I would to write a query to display the number of days taken for each of the 12 months of the year.
In the example of Employee 4 their sickness spans two different months, I can't get my head around how to produce the correct result which should look like:-
I am trying to decide which is the best way to setup the tables in a customer database.
We have customers with contacts - that bit is simple. Each of out customer has numerous sites and each site has is own contacts.
The questions are:
1. Should there be two tables for Customer sites (main site table and sub site table) or is it best practice to have all sites in a single table with a column linking subsitesID to the ID of the main site: ie
tblSites SiteID (PK) SiteName MainSite (if the site is a subsite of another) More site information fields......
2. The same question really goes for contacts. Should there be a single table for all contacts (easy if only one table for sites) or seperate tables for mainsite contacts and subsite sontact.
I guess this is really about normalisation.
I have managed to get the system I am developing to work with both methods but I would be keen to understand what is the most acceptable method.
I am about to create a system where I want to use MS Access for data and MS Outlook for email,contact management etc. I have a dilemma (what do I use for storing the contacts)? I know I can use Access and use VBA to send emails etc but I also want the user to be able use Outlook directly to send emails etc as normal using that contacts (Outlook) list. Using Office XP at the moment btw.
I would appreciate comments as to the best way forward before I start. Thanks in advance.
My application has 12 main tables, 8 join tables connecting the main tables, 8 tables of attributes about the main tables, 21 note/classification tables, and 1 type table. The application provides relationships between data and does _no_ updating. In order for the data to report correctly, subreports are necessary.
I wish to create one report for a Section of data. There are 3 report possibilities: 1. Report of "section" item in one table, with all connections to items in main tables; 2. Report of "section" item in one table, with all connections to items in main tables and connections to items in attribute tables and note/classification tables, omitting printing of Description fields for all tables; 3. Report of "section" item in one table, with all connections to items in main tables and connections to items in attribute tables and note/classification tables, including printing of Description fields for all tables;
My questions are as follows: 1. Should I be building the report in Access or Crystal? (I have a licence for both, but so far have used only Access). 2. Can these options be built into one report, or do I need multiple reports? I.e. I could build the report with Subreport A) including a report on a main table and Subreport B) including a report on a main table, attribute table, note and classification tables. Are there better ways to do this? 3. How do I make the Description field, printable or not, flaggable at run-time?
I was going to say before I screw it up, but that would have made the title too long.
I've read some forum history and done some searches and can't see that a similar query has come up previously - but if anyone can point me at previous relevant threads then that would be much appreciated. I've looked at some of the design theory threads, but am not really sure whether I've applied some of the good stuff in there effectively - and have put this query here as it's specific to my database rather than a 'general principles' thing.
I am hoping that some kind person/people might be able to pick holes in my planned database revamp as I may not have seen some of the pitfalls - thank you.
Background: I am the first and sole employee of a grant-making trust and set up our (still relatively small) database early on - wish I could have waited, but before my database everything was paper-based and impossible to manage. The data is all on the database, but an exponential growth in number of enquiries/applications over the last year means that it can't be easily manipulated in a way that meets our needs because of my short-sighted (OK, poor owing to inexperience in job) initial design in some areas.
Database: What it's supposed to do: In brief, the way our organisation works is that we get a phone call or a letter or sometimes an entire application from a charity or community group, decide what to do with it and have to manage the funding contract (regular reviews, grant instalments) if the application is successful.
I think existing data is reasonably normalised (certainly at least equivalent to normalisation in the structure below) so migration shouldn't be a problem, but if anyone spots any normalisation or naming convention issues then please do point them out - I'm an Access amateur, but would like to get it as right as I can (this time). Small letters indicate linked tables, numbers indicate 'footnotes'.
(a) tblProjEvent PEvID (primary key) PEvDate ProjName ProjEvent (g) ProjEvDesc - additional detail - e.g. who involved, topic if not obvious from event field. ProjEvActWho - who is responsible if future action ProjEvActDue - due date ProjEvActComp - checkbox ProjEvActCompDate ProjEvNote (NB not to duplicate description - more for 'additional notes arising from completed action' or sensitivities that may need to be considered and kept separate from regular reporting)
(b) tblOrganisation Details not listed for brevity, but split one field per line of address/detail, org name as primary key - existing table can be migrated as is (2). Includes suppliers, networking orgs. (f)
(c) tblProjSourceLup How they heard about us - list of sources for speed/consistency of data entry.
(d) tblProjStatusLup What it says on the tin - where we're at right now with a project. History/status changes recorded in tblProjAction.
(e) tblProjReasonDecline List of common reasons for speed/consistency of data entry
(f) tblOrgContacts OrgContact ID (primary key) Names/personal details of organisational contacts, split one field per item (firstname, lastname, jobtitle, etc).
(g) tblProjEventLup Letter, Funding contract, review meeting, report, telecon, Board review, etc. May be a future action.
Accounts functions: Payments in/out linked to organisation with a lookup table for account types (in, out, grant, donation, expenses etc etc). Works fine and can be migrated as is (2)
The current arrangement of relationships has the organisation as the focus - I'm looking to make the project the focus, which seems to make sense as each project is unique - whereas we may get several project applications from the same organisation - and the existing structure makes it impossible to sort these out :o.
Footnotes
1) Vast number of applications that fall into the "arrive, get read, get binned" category make this duplication worthwhile - most applications won't make it into the Project Event table. Apart from the "Greetings in the name of the Lord"/419 e-mails, they do all need recording somehow so we can spot any trends and correct misinformation - save hard-working fundraisers wasting their time*.
2) Of course data validation will be necessary, but in most tables we're talking hundreds or thousands of records only, not tens of thousands so should not be that onerous. Especially as I've been the only person using the database, so there are hopefully not too many inconsistencies!
This post is too long already, but if I've been uselessly unclear in explaining anything or anyone wants any more before they want to comment on efficacy of structure please let me know. All feedback appreciated (as I said, I work alone, so really looking for idea-bouncing to check I can see the wood as well as the trees as much as anything - thanks).
*As charity is always a sensitive area and some of you may be involved with voluntary work, an OT comment: 'No response' might seem rude - but if an organisation is -clearly- excluded by the criteria on our website, or that very same person (or a large charity who should be able to manage its information effectively) has previously been told that they are ineligible by reason of their location, size or type then they have had their response already. I could spend all day every day writing 'No' letters - I'd rather be doing something more positive with my time (like checking out/meeting with organisations that are potentially eligible so they get their answer - and in some cases money ASAP). Not R-ing TFM (aka grant guidelines) apparently applies to fundraisers as much as any other profession :rolleyes:
I've got this problem and im 95% sure its going to need a query in order to achieve this answer im looking for.
I'm creating a Software Licensing Management db and its all working lovely. However my only problem remains is the graphical representation (text box within one of the forms) of howmany licenses are/aren't(doesnt matter if this number is a +/- number) available.
In order to achieve this answer I dont think you'l need the table structure of any of my tables other than these two:
However I would like to add a column to either of these tables named 'Availability' or something similar which will show the licenses available.
I've tried a number of Update/Append queries but all have failed. I want this Available running variable held within the table due to it not changing to much of the current db design as i baisically finished the project and they asked for it! any ideas of how to efficiently achieve this will be much appreciated!
Before I post on here I always try to look back through the posts for similar problems – however I don’t know where to start looking to solve my problem.
I use access to store and record the details of my sales. As well as the prices, I also store the date of the sale.
I want to be able to add up the value of the sales for each day so I can see how much we sold – but I don’t know how to go about it. I’ve tried performing a query and then applying a filter by form – however when I click on the “Date” column, the drop down selection displays a list of identical dates:
And when I click on one of the dates it only shows the data for that individual record, rather than the data for all the records on that date.
Could anyone please nudge me in the right direction? Should I be looking to perform a normal query? Or do I need to work on a different type/advanced query?
Eventually my intention is to create a form which links the queries to a report so I can print out the data, however for now I’d be overjoyed to simply be able to display the values in a table.
Any help would be greatly appreciated! Thank you for your time.
Hi :DFirst off, i am a complete novice in this area, so be kind:D I’m currently doing a Bsc in Computing, and we have a database module ( my worst subject :( ) the current assignment is to create a DB for a specific task, and one of the objectives is to create a login page for the DB . I tired to use Access's built in 'user and permissions wizard' but had no luck there.I have a staff table, and linked that to a permissions table, I assigned each member of staff a user level (5 levels in all). I then created queries to filter each of the 5 levels, and used parameters in each of the 5 queries to prompt for a username and password. I then created a form for each of the queries. i then tested each of the forms, and it asked for the username and password, and I was in, I thought my idea had worked, however, if I enter I wrong username or password, the form will still appear :( .I’m wondering if there is a way to validate the query parameters? or is there an easier way I can do this? I know i am probably going about this in completely the wrong way. All I need is a main login page, which will offer each user a different GUI.Any advice will be greatly appreciated. As aforementioned, this is not my best area, and this is the first time I have actually used access :(.Thank you in advance :)*EditI have searched th eforums, and cannot seem to fidn anythign on parameter validation, but did find a lot of ways to code a login page. i do not want to do this so i will stick with using access's built in users and permissions. I know that to login you need to click the shortcut that is created, but if i take my DB elsewhere how can i get that login page to be displayed? becuase if you click directly it will nto let you in , u need to click the shortcut, so how could i get around that?? thank you :D
I have a table called QuizResults which has 10 Yes/No fields. The table also has a field called Site.
Each site will take a quiz and the problem I am having is with the statistics side of things.
What I need is a query that will work out the percentage correct for each site. All the data is stored in this 1 table. There are no relational fields as they are not required. I have tried a few different ways but each method I use involves me making many many queries to work this out.
To summarise I need 10 percentage correct fields, broken down by site.
I'm looking for a keyboard shortcut to expand the columns in "design view" of a query.
What I mean by this is rather than selecting all of the columns and double clicking to see the entire text, I'd like to be able to a shortcut.
The entire process as I see it involves 3 steps so I will need thesolution to the 3rd step.
(1) [ctrl+spacebar] to select initial column (2) [shift+arrows] to select all of the columns I need (3) [keyboard shortcut] will expand all of the columns "field" names to the size of the column heading
Alternatively, if you know of a shortcut that will expand the columns without having to select them first I'll take it!!
Part of the function of my Db is to produce quotations. I specifically need one table containing line items and will use another table (update query) which will contain the 'quoted for' items. Transfer will be based on numbers of users required. I have the basic idea in mind; i will have a form with drop down to select numbers of users and then some Vb to take records from one table to the other. I can do that fine. The bit I am struggling to structure in my mind is as follows:
In a quote there will be typically three line items
1) Software 2) Installation / Configuration 3) User Training
I can easily do as described above but that relies on the main table being pre-populated with all three line items. however, I'd prefer to have the ability to have prices for daily rates, relating to installation and training, in another table so as to be able to change/update them and not have them fixed in a table.
So I think I would want to have the three line items update query across buy somehow control the list price of the services element controlled elsewhere.
Part of the function of my Db is to produce quotations. I specifically need one table containing line items and will use another table (update query) which will contain the 'quoted for' items. Transfer will be based on numbers of users required. I have the basic idea in mind; i will have a form with drop down to select numbers of users and then some Vb to take records from one table to the other. I can do that fine. The bit I am struggling to structure in my mind is as follows:
In a quote there will be typically three line items
1) Software 2) Installation / Configuration 3) User Training
I can easily do as described above but that relies on the main table being pre-populated with all three line items. however, I'd prefer to have the ability to have prices for daily rates, relating to installation and training, in another table so as to be able to change/update them and not have them fixed in a table.
So I think I would want to have the three line items update query across buy somehow control the list price of the services element controlled elsewhere.
I have a list of events and what the out come was on a particular day or date.
To give you some idea, the event is basically number given to a day and the outcome is all possible things that “could happen” and that did happen (so not all 160 possible Outcomes are used all the time).
So it is quite possible to have:
Event 1 (This could be “Monday”) Outcome 12 (This could be “Rain”)
Therefore as you collect your data over time the “Outcome Diff” would = 12
The problem comes when I try to create a report to automatically calculate the “Outcome Diff” this in a Query as the “counter” that should have been added at the time this was created was not done at the time. I also do not mind if this has to involve creating to a table, as long as I get the “outcome diff” calculated in MS Access, I do not mind how this is done. I also cannot use date diff as event mean more than just an index for the day.
Event, Outcome, Date, Outcome Diff 12, 1, 14-Feb-95, 12 (0 to 12 = 12) i.e this is the 1st event outcome of 1 22, 1, 19-Apr-95, 10 (12 to 22 = 10) i.e this is the 2nd event outcome of 1 29, 4, 07-Jun-95, 29 (0 to 29 = 29) i.e this is the 1st event outcome of 29 34, Ect... *This is just a representation with test data.
Just for further clarification: the reason this is need this is to find out difference in "event" days as opposed to just an average.
I have some basic VBA and ADO recordset exposure, and would like to create a form, that:
- allows a user to search 4-5 fields (client & business name based information) - return options of records to view that match that data - allow user to make a selection, which then provides another form with full details of that client's record(about 20 fields)
Can anyone provide an example or perhaps guidance on a good tutorial, that will take me through this process gently (and help me understand the process)!
I now understand that when opening and saving crosstab queries Access (2010) runs that query to ascertain the column names. Unless you hard-code them. Running the query takes at least 20 minutes. I have hard-coded where I can, but one report takes arbitrary dates so I can't hard-code them.
I believe that turning off AutoCorrect might make a difference to whether the query runs - but I don't want to turn it off.
In some cases I create pass-through queries and use these in an Append or Make-table query to bring data locally.
All is well and fine until source data changes and the pass-through query runs too long and times out.
If needed, I can extend the timeout value in the Parameters of the pass-through query no problem, but when I try to open the Append or Make-table query in Design view to do the same, the pass-through query is first triggered and then throws the timeout, and I cannot access the Design view of the Append or Make-table
Is there a way to open an Append or Make-table query in Design view without invoking the source query?
I have a sub form in DataSheet view and I would like to lock the design so that the User should not change the layout
Even when I set the property of the Datasheet “Allow Design Changes: Design View Only” users are able to unhide the hidden columns and they can also change the size of the column by dragging the column end line
Does any one know how to lock the design of datasheet ( I am using this sub form datasheet for data entry but do not want users to change the layout)
From this table, I can determine which employees have taken which courses. But how do I determine which employees have not taken a particular course (prompt for course code).
**Note: There is no table that contains a list of courses, since there will be over 2000. The courses are simply entered for an employee as they are taken.
Table 1 contains telephone numbers and rates per minute Table 2 also contains telephone numbers and rates per minute
I am trying to check the rates in one table against the other.
The problem I have is that the telephone numbers in each table are of differing lengths.
For example ...... Table 1 contains telephone number 01234 567890 Table 2 contains a rate for numbers starting 01234 5
I have split the numbers in Table 1 in to 0, 01, 0123, 01234, 012345, 0123456, 01234567, 012345678, 0123456789 and 01234567890 but I am stck on how I can now use this to match to data in Table 2.
In 'words' I would like the database to 'say' ...
0 in Table 1 - Is there a match in Table 2, if so what is the rate? If not then look for ..... 01 in Table 1 - Is there a match in Table 2, if so what is the rate? If not then look for ..... 012 in Table 1 - Is there a match in Table 2, if so what is the rate? If not then look for ..... 0123 in Table 1 - Is there a match in Table 2, if so what is the rate? If not then look for ..... 01234 in Table 1 - Is there a match in Table 2, if so what is the rate? If not then look for ..... 012345 in Table 1 - Is there a match in Table 2, if so what is the rate? If not then look for .....
etc etc etc ....
The numbers in Table 2 are varying in length.
Can anyone provide guidance on database design and / or help with writing queries ?
Hello,I am attempting to create a database for a charity organisation, the database will hold information about there volunteers, roles, languages, building, and shifts.One of the main problems I have at the moment is how would I cater for the shifts. Open Sunday - Monday 6 Shifts at present different days are open for different shiftsAny help pointers greatly appriciated.
Design Query : by two criteria I have a table by tow field : 1- name : for insert name of book 2- date : for insert date And I have a Query by two criteria 1- name 2- date (Between [Enter Start Date and [Enter End Date]) In my query I have tried the following formatting 1-Criteria: Like "*" & [forms]![bank].[Text0] & "*" 2-Criteria: Between [Forms]![bank]![Text2] And [Forms]![bank]![Text8] Open Form “Bank” and try : 1- report by name (means report only of name Field) 2- report by date (means report only date between date Field) 3- report by name and date (means all complete fields in “bank” Form) But ; I'm not sure how to do that for two criteria in queries Please enter criteria in query
I have written a query to calculate how many hours we have worked for our clients. This has a number of sub-queries which sum to make different columns in the main query ie: Hours invoiced so far, Hours to be invoiced, Hours remaining from their allocation, etc. I am refreshing the queries due to a design change and now have a question..
Which is the better design:
To have those sub-queries with selection criteria from a join to the same table in each (to filter out records at a lower level) OR To have that same selection criteria and join just once in the main query? (which of course means its processing many more records but the join to the selection criteria is specified once)
Hi All, I am currently in the process of writing a manual for one of our access database systems (it's written in a modified version of access). Unfortunately this database was not written by me and has many different queries which in the end returns a number of export files... Obviously I could look through each query one by one and copy the details down into a table in word or whatever.
I am just wandering is there any way to export the design of the query itself or even print it out, as obviously I could then complete a Visio like diagram and include that in the appendix of the manual.
Searched google and the access help and what not but I can't seem to come up with anything :(
i'd like some initial help with how best to set-up my tables for a database i need to create. if anyone could give me a synopsis of what i need to do it would be great and then i can try and piece it together.
here are the requirements;
one student can attend many different courses.
each course runs for 10 weeks.
i'd like to be able to have forms to;
- add a student. - assign classes to a student. - record absence via a combo box for each student for each week
i'd also like to have a report mechanism that can record if a student is absent for 3 or more classes.
as i said, some pointers or examples would be great as i am new to this. i pressume i need;
a table for students studentid firstname lastname
a table for the courses courseid coursename
a table for attendance attendanceid courseid studentid present/absent (combobox) week
Am most stuck on the date part. the data may not be entered every week so i can't really use a date function. instead i need a combobox or something to be able to select the week.
I will try to explain this as best as possible, please let me know if there's any more info i can provide in order to get a better response. I am making a database that links the following tables:
Product Fund Company
The value for each of these combinations will be a simple yes/no, but the problem with the relationship design comes in because of the companies. For each company there are multiple smaller companies, for instance B company is comprised of a1, a2 and a3 entities. The information I am puting into the database is specific to the a1, a2 and a3 entities, not B company as a whole. What i need to query is B company as a whole. For instance, i need to know that B company can sell widgets(product) through 1, 2, 3 and 4 (funds).
I can't think of a way to consolidate the data from the smaller companies into the data for the company as a whole, especially since the smaller companies may sell the same products in the same funds. My current Table relationships looks like this: http://img338.imageshack.us/img338/5282/tableif8.jpg but i don't know how to manage the company as a whole(eg. B Company above)
The second problem i have is once i have the data for the company as a whole i need to be able to query multiple funds. I thought this was going to be easy at first by switching "or"s to "and"s but, even after playing with parenthesis any "and"s that i add just make it so it is looking for "1 AND 2 AND 3 AND 4" in one field. what im trying to make it do is query (Product = z, Fund = 1, available? = yes) AND (product = z, fund = 2, available? = yes) etc.. and have it output a list of Companies (eg. B Company)
I realize that I can query like this by querying a crosstab with funds as columns, but the problem with that is funds will change because I have 5 groups of people using the database who want different sets of funds (and it will output entities, not companies).The database needs to be dynamic so when one group of people changes their preference of funds or we add a new fund I dont have to make a brand new query/form/report.
Any comments/quidance is appreciated, please let me know if you need any more information. Thanks! :)
I am using Access 2003 with Windows XP Pro. I have a problem with using a query and the dreaded UK Postcodes!
I have a Client table that contains a field “Client Postcode 1”, in which is entered the first part of the UK postcode i.e. AB11, WC1A, E1, EC2V, etc.
In a Candidate table here are many text fields where we enter which postcode a Candidate wants to work in, i.e. TN, CV4, EC, W, etc.
We have a separate Candidate Search form where we select a particular client (Combo box from the Client table) which then displays the Client’s Postcode 1 data i.e. the first part of the UK postcode before the space.
We have a select query that then tries to match the Client Postcode 1 with the postcode that the Candidate wants to work in from the Candidate’s table.
In this query design grid I have successfully created criteria that will match the Client Postcode 1 field to the Candidate’s postcode field – very straightforward. This, for example, will match a Client with a TN39 postcode with a Candidate who wants to work in the TN39 postcode.
In the same query design grid I have also been able to successfully match the Client Postcode 1 field to a Candidate’s Postcode field using just the first 2 letters (using Left). This matches a Candidate who wants to work anywhere in the TN postcode area (TN1, TN2 etc.) with a Client whose postcode starts with TN
However, what is stumping me is where a Client’s Post code has only 1 letter followed by numbers (E1, B2 etc) in the first part of their postcode without returning EX, BL etc. I would like the accumulated wisdom on this forum to point me in the right direction to design criteria to input into the query design grid that will match ONLY the first letter of the postcode IF the second character is a number.