Design Query : By Two Criteria

Feb 1, 2007

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 would appreciate the help!

View Replies


ADVERTISEMENT

Getting Query Criteria To Select All Records Or Specific Records In Query Design Section?

Jun 16, 2014

How can I get a Query Criteria To Select All Records or specific records in query design section.

I have a table that shows many departments with credit card transactions. I like to run a query to see specific department, or have an option to see all the departments when the query is run.

View 2 Replies View Related

How To Change Criteria Not In Design View

Jul 30, 2007

Is there anyway to change the criteria in a field without going into design view I bascially need to be able to type in a particular item in a certain field in a query and it return all the results for that one.

The database has over 160000 records and when I try using a form it takes forever.

View 1 Replies View Related

Query Design.DB Design Question

Sep 10, 2007

Hey,

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:

tblLicenseInformation
License_ID
LicenseDescription
NumOfLicensesPurch
SoftwareOverview_ID

tblHardwareSoftwareLicense
HSL_ID
Hardware_ID
Vender_ID
Software_ID
AppEdition_ID
AppVersion_ID
SoftwareOverview_ID
License_ID

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!

cheers

View 3 Replies View Related

Design View Keyboard Shortcut - Expand Columns In Design View Of A Query

Jun 5, 2014

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!!

View 4 Replies View Related

Setting Query Criteria To Be 'blank' Depending On The Criteria Of A Combo Box

Oct 21, 2006

I have set up a database that stores actions (i.e jobs). In the table; two of the fields are...'required completion date' and 'actual completion date'. I wish to lookup, by using a query, all of the open actions (those which havent yet been complete (i.e the 'actual completion date' is null)) and then later on all those which are overdue (i.e the 'actual completion date' is null And the 'required completion date' <today....this being the criteria for an overdue action).

However, I have used a form which has a combo box which contains the values open and overdue. When a selection has been made I want a form to display with the results depending on the selection that has been made. I am capable of creating a form based on a query, but am unsure of how to construct the query with the correct criteria based on the option that is selected from the form.

Any help would gratefully be appreciated. Thanks

View 5 Replies View Related

How To Query Data For Specific Criteria - Criteria Help

Aug 20, 2007

I have data for hundreds of stores. The data was pulled for the top 15 items by store, so I cannot obtain only the top 5 items that I need. How can I query this data to extract only the top (or bottom) 5 Subjects, by store, based on the percentage column?

StoreSubjectSalesSales %
1516Fiction56431.5-24.15%
1516Audio Unabridged1650.8-231.04%
1516History / Military History10081.1-29.99%
1516Role Playing / Graphic Novels14773.9-20.27%
1516Mystery13152.6-19.84%
1516Audio Abridged1785.9-141.84%
1516SciFi / Fantasy27535.3-7.93%
1516Juv Audio/Video1580.6-100.13%
1516Biography8103.6-15.89%
1516Sports7910.8-15.64%
1516Current Affairs / Law8141.9-14.34%
1516Reference7183-16.22%
1516Juv Non-Bk4585.9-25.02%
1516Science / Tech2961.4-33.98%
1516Movies / TV / Music / Dance3395.3-29.46%
1872Fiction307344.3-7.49%
1872Business134307.5-13.48%
1872Psych / Self Improvement100650.4-10.05%
1872Audio Unabridged29165.9-27.32%
1872Cookbooks57463.3-13.56%
1872Computers59235.7-12.37%
1872Regional59883.4-11.22%
1872Health & Fitness64713.8-10.29%
1872Maps19358.4-27.66%
1872Current Affairs / Law47927.1-11.08%
1872Travel Foreign42583.7-12.27%
1872Religion / Bibles80255.6-6.07%
1872SciFi / Fantasy67641.4-6.49%
1872Study Aids / Notes38299-11.24%
1872Games41745.1-9.79%

View 2 Replies View Related

Queries :: Crosstab Design Is Slow When Opening And Saving In Design Mode?

Oct 6, 2014

I have had to use my first crosstab queries.

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.

View 6 Replies View Related

Queries :: Opening Design View Of Append Query Without Timing Out Source Query

Mar 4, 2015

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?

View 1 Replies View Related

DATASHEET --- Allow Design Changes: Design View Only DOES NOT WORK

May 18, 2007

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)



Thanks
Rahul

View 1 Replies View Related

Help With Query Design

Jun 12, 2005

I have 2 tables "tblEmployee" and tblEmployeeCourses; they are joined by EmpId.

tblEmployeeCourses, simply shows "course code", "course name", "institution", and "date taken" fields.

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.

Thanks for the help.
BJS

View 1 Replies View Related

Design And Query Guidance Please

Dec 1, 2006

I have two tables in my database.

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 ?

Many thanks !

View 2 Replies View Related

Shift Design Query

Apr 22, 2007

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.

View 1 Replies View Related

More Efficient Query Design..

May 29, 2007

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)

answers on a postcard please..

View 3 Replies View Related

Exporting Query Design.

Apr 24, 2008

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 :(

View 2 Replies View Related

Table Design Query - Attendance

May 26, 2006

hi,

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.

cheers
mark

View 2 Replies View Related

Complex Database/Query Design

Aug 23, 2007

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! :)

View 7 Replies View Related

UK Postcodes In The Query Design Grid.

Oct 13, 2006

Hi everyone;

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.

Regards to all - and what an excellent site!

View 1 Replies View Related

Query Design Problem - Advice?

Feb 4, 2008

Hi all,

I have a table of employee sickness / absence records with the following structure and data:


http://www.geocities.com/cyngorsir_ynys_mon/TBL_SICKNESS.gif

I have figure out how to write a query which displays the number of days taken for each sickness (END_DATE minus START_DATE).

http://www.geocities.com/cyngorsir_ynys_mon/QRY_DAYS.gif

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:-

http://www.geocities.com/cyngorsir_ynys_mon/OUTPUT.gif

The only way I can think of doing it is by recording each day of sick individually rather than just the start and end days?

ANY input / comments / observations would be greatfully received!

Thanks

View 3 Replies View Related

Possible To Pull A Query Into Form Design?

Jul 4, 2014

Is there a way to pull data into my form so that I can see current stats about my table in the same box as where I'm entering new data?

View 7 Replies View Related

Good Design? Bad Design? Problems..

May 5, 2005

I'm going to make up names and values -- I'm interested in the structure.

Table ALPHA:

COLA DAT1 DAT2 DAT3
1 5 7 9
2 4 14 8


Table BETA:

COLA_IND DAT1 DAT2 DATN
1 a b c

Table CHARLIE:

COLA_IND DAT1 DAT2
2 d e

Table DELTA:

COLA_IND DAT1 DAT2
2 f g


Ok, the idea here is that the data in table ALPHA contains data with COLA a key such that selecting 2 would yield the data row "4, 14, 8."

Now, COLA_IND is a "COLA" key for table ALPHA (sorry, I can never remember which side is called the foreign key). So, from tables BETA, CHARLIE and DELTA, I can access any row in ALPHA based on the key "COLA_IND"

Here's the fun part. When I build my query, it wants to use an inner join on the keys from all these tables... In order words:

SELECT blah blah blah INNER JOIN blah ON (ALPHA.COLA=BETA.COLA_IND) AND (ALPHA.COLA=CHARLIE.COLA_IND) AND (ALPHA.COLA=DELTA.COLA_IND)

What I'm looking to do is expand BETA, CHARLIE and DELTA with the information from ALPHA based on the key COLA_IND. I don't think this is doing what I want.

Any comments?

Thanks in advance...

View 1 Replies View Related

Count Function In Query Design View

Jan 3, 2006

I have a query where I want to see a percentage of executed demos. I currently have Name of the promo (group by), # of demos (group by), Status (criteria = E for executed demos, count) and Percentage: Status/# of demos. Everytime I run this query I get this message: "Data type mismatch in criteria expression." The only data in Status is either a O for open or an E for executed. The E in Status is the only criteria I have in the whole query. If I take the count function off Status, it runs, but does not give the right results. Does anyone know what I am doing wrong?

View 14 Replies View Related

Query Design To Retrieve Required Input

Apr 27, 2007

I have been asked to create a database in Access 2000 that will hold 1.6 million postcodes. There will be four fields within the a table one holding the postcodes, and three fields holding information as to whether or not the post code is classed as good, neutral or bad. The requirements are to allow a user to run a query that asks thenm for the required postcode and then displays the relevant information (good,bad,neutral).

There requirement is that the search is done as fast as possible returning the required results. Has anybody got any ideas as to the best way of doing this.

View 2 Replies View Related

See Query Design FULL Field's Contents?

Feb 22, 2006

Hi,

I have some queries that I created in 97 and convert to Access 2000.

However, when I go to query DESIGN view, I would like to see all the contents of long functions (iif) that I wrote for some fields as a result of running the query, but each field only shows a portion of it (as if it was truncated). I also use the "Zoom..." of that field or Shift+F2, still the same thing, only shows portion of it, the last portion was truncated.

Do any of you know HOW to show all, so I can check and revise if I need to, pllllllease.

Thank so much,

View 1 Replies View Related

2003 To 2007 Query Design View Help

Dec 17, 2007

We are opening up a database that was made in 2003 with 2007. The design view gives us an error of "'' is not a a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long" Does anyone have a solution for this problem?

View 14 Replies View Related

Queries :: Design Unmatched Query On 2 Tables

Oct 22, 2013

I need to design an unmatched query on 2 tables to identify employees names that exist in 1 table but not the other (or names are misspelled, etc.). The tables exist in on a server and I do not have the ability to change either. Table 1 has the following structure:

EMPLOYEE NAME: Doe, John ID-12345
Table 2 has the following structure:
LAST NAME: Doe
FIRST NAME: John

Since the field names are not equal, the unmatched query wizard (as far as I know) will not work. I've tried using "NOT LIKE", LEFT JOINS, RIGHT JOINS, NUll Values, etc. in the SQL but nothing has worked as yet.Here's the SQL I've been working with but this returns all values (haven't figured out why):

SELECT DISTINCT [Table 1].[EMPLOYEE NAME]
FROM [Table 1], Table 2
WHERE ((([Table 1].[EMPLOYEE NAME]) Not Like "([Table 2].[LAST NAME]*"));

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved