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 Replies


ADVERTISEMENT

Pre-Design Dilemma - Advice Required

Apr 13, 2006

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.

View 2 Replies View Related

Need Some DB Design Input

Feb 22, 2007

Hey guys,

I'm creating a database based on an Excel file. The Excel file has about 180 columns and are only linked by to distinct fields. Is there any possible way that I can break this down into easier to manage tables? There are different categories of columns such as

Financial Info
Personal Details
Products
Requirements

I'm not too sure how to link these categories other than the two distinct fields I've mentioned and I know it's not a good idea to have 5 tables with identical primary keys across all 5. Can anyone offer some input?

View 5 Replies View Related

Forms :: Fields Are Required To Be Filled Out Even Though Not Set As Required

Nov 3, 2014

I have made a form based on related tables. it requires me to fill out every field, which I don't want. I didn't make them required. Why does it do that?

View 3 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

Query Cannot Retrieve Enough Fields

Feb 7, 2007

I'm trying to build a form based on a query to use for data editing/entry purposes.

The only way I can think of to do this is to use a query to get data that is particular to my specified customer.

The first problem I have run into is that one query does not contain enough fields to retreive all the fields in my table.

I figure, perhaps I have made a flaw in my design and shouldn't go further with this until I verify it to be true. I don't think I've made a flaw, but the fact that a query has limited maximum number of fields leads me to think I might have.

Each record in the table I'm querying contains several pieces of numerical data that might be recorded during a service visit.

Obviously I could query the table twice but that doesn't feel like the right way to go about it.

View 3 Replies View Related

Retrieve Figure Using Query?

Jun 14, 2007

Hi,

i have got a database which consists of table, queries, forms and reports.
I have one problem now is that I wan to do a query that will be able to bring the figure from another field to the current one.
ok say i have got Ref_No, Event_Date, Balance_BF, Adjustment, Balance.

so if say this is the first event for this particular ref_no (1234) it will bring the amount from another table (Principle_Table) linking the same ref_no (1234) to the Balance_BF fields,
If this is not the first event for this particular ref_no (1234) it will then bring the amount from the previous event Balance field to the current event Balance_BF field.

I am very lost how to do this. Is there a way doing this using query?

This is wat i mean
Ref No Event Date Balance_BFAdjustment Balance
06/00014 31-May-06 115140-5,757.00 $109,383.00
06/00014 31-Aug-06 109383-5,757.00 $103,626.00
06/00014 30-Nov-06 103626-5,757.00 $97,869.00
06/00014 28-Feb-07 97869-5,757.00 $92,112.00

U can see that the Balance_BF is actually brought down figure from the previous Balance starting from the second events. For the first event, the Balance_BF is actually draw down from another table (Principles_Table)

Is there a way to do this using query?

View 4 Replies View Related

Retrieve Query Parameter?

Oct 19, 2005

I have a query and using a [text string] as criteria in the Design Window - when the query runs, entering the appropriate search string retrieves the appropriate results. I have created a form using this query as the recordsource - and as such the user is asked for the string before the form loads and the results are displayed.

Is it possible to retrieve the string the user entered and display this value on the form?

View 2 Replies View Related

Query - Retrieve A Set Number Of Records

Nov 4, 2005

Hi all,

I want to retrieve a set number of records from a table, using a query. I'm not sure of how to do this.

I can't use the ID, because the table gets its data replaced contantly by imports (so the ID doesn;t start at 1...)

I want to be able to retrieve, say, the first 25 records on that table.

Any help is appreciated

View 2 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

Need Helps On Query Retrieve Range Of Dates

Apr 18, 2007

4/11/2007 1:01:28 AM
4/12/2007 2:02:52 AM
4/13/2007 4:21:30 AM
4/14/2007 2:22:21 AM
4/15/2007 3:34:53 AM
4/16/2007 4:02:37 AM
4/17/2007 5:03:15 AM
4/18/2007 7:17:34 AM

I need some helps
I have a table with date + time, how can I query so that it retrieve a 7 days range from today and go back ti 7 days

i though this should work (it works if the the table has date only no time)
Between Date() And DateAdd("d",-7,Date())

thanks

View 2 Replies View Related

Queries :: Retrieve Data From A Table From SQL Query

Feb 21, 2014

How to retrieve data from a table (via query) ? I created the below query, but I'm not sure what else is needed to retrieve the value from my SQL query. My query code is below. I'm not getting any errors.

Dim strClient As String
strClient = "Jerry Davis"
strSQL = " SELECT [Progress Tracking].[Client Name], [Progress Tracking].[Client Start Date],
[Progress Tracking].[Start Body Weight], [Progress Tracking].[Tracking Date]
FROM [Progress Tracking]
WHERE [Progress Tracking].[Client Name])= ' " & strClient & " ' "
MsgBox "Weight Box " & " " & strSQL

View 12 Replies View Related

Queries :: How To Retrieve Column Data Using SQL Query

Apr 14, 2014

I'm trying to retrieve data based on the contents of one column.

Sample table

Code:
Description EID Basecode
----------- ---- ---------
ssdad 1001 S2378797
gfd 1002 S1164478
gfdsffsdf 1003 R1165778
ssdad 1004 M0007867
gfd 1005 N7765111
gfdsffsdf 1006 W5464111
gfd 1005 N7765111
gfdsffsdf 1006 A4000011
gfdsffsdf 1006 W5464111
ssdad 1001 2378797
gfd 1002 1164478
ssdad 1001 965000
gfd 1002 780000
yjgk 4456 540000
kjhkh 2009 150000
ddd 1004 1040
d88jg 1004 14C676
fsa 6565 158
fdh 1004 2Khlm
ggdg 2009 967

I'm retrieving all **Basecode** column data starts with only letters other than 'W', 'N' by this query

Code:
SELECT tbl1.EID,tbl1.Description,tabl1.Basecode FROM tbl1 WHERE Not
IsNumeric(Left(Basecode,1)) AND Left(Basecode,1) Not In ("W","N");

And retrieving all **Basecode** if column data length >6 and with numbers '96', '78','54','15' by this query

Code:
SELECT tbl1.EID,tbl1.Description,tabl1.Basecode FROM tbl1
WHERE (((Len([Basecode]))>6)AND ((Left([Basecode],2))='15')) OR
(((Len([Basecode]))>6) AND ((Left([Basecode],2))='54')) OR
(((Len([Basecode]))>6) AND ((Left([Basecode],2))='78')) OR
(((Len([Basecode]))>6) AND ((Left([Basecode],2))='96'));

How do i get other data which won't retrieve based on above queries, other than data mentioned on these queries like this

Code:
Description EID Basecode
----------- ---- ---------

ssdad 1001 2378797
gfd 1002 1164478
ddd 1004 1040
d88jg 1004 14C676
fsa 6565 158
fdh 1004 2Khlm
ggdg 2009 967

Third query not working

Code:
SELECT tbl1.EID,tbl1.Description,tabl1.Basecode FROM tbl1
WHERE (IsNumeric(Left(Basecode,1)) AND Left(Basecode,1) Not In ("W","N"))
AND NOT (((Len([Basecode]))>6)AND ((Left([Basecode],2))='15')) OR
(((Len([Basecode]))>6) AND ((Left([Basecode],2))='54')) OR
(((Len([Basecode]))>6) AND ((Left([Basecode],2))='78')) OR
(((Len([Basecode]))>6) AND ((Left([Basecode],2))='96'));

View 5 Replies View Related

Creating A Query That Will Retrieve Different Data From Different Records?

Mar 17, 2014

I am trying to create a Database that will type our orders. I have a table with our customer list that includes both billing and shipping information. The problem is that sometimes one customer will request a "drop shipment" to another customer. Is it possible to retrieve different data from two different customers? Billing info for customer "A" and shipping info for customer "B" without creating seperate tables?

View 1 Replies View Related

Queries :: Can Retrieve Value Of User-defined Type In A Query

Aug 19, 2013

Is there a way to retrieve the value of a user-defined type in a query?

Here's the type:

Code:
Public Type ClassRank
Rank As Integer
ClassCount As Integer
End Type

I have a function with the following excerpt:

Code:
Function GetRank(strDOD) as ClassRank
...
GetRank.Rank = intRank
GetRank.ClassCount = intCount
...
End Function

In my query I expected to be able to put the following:

Code:
GetRank(strDOD).Rank & " " & GetRank(strDOD).ClassCount

However, Access didn't like the period in .Rank or .ClassCount.

Should I just write two different function to get 'rank' and 'classcount'?

View 2 Replies View Related

Modules & VBA :: Retrieve Data From Excel And Load It To Query

Aug 12, 2015

Current situation is that I have this form with a chart.

Row Source :

Code:
SELECT PolyWrongRegInsCount.[INSTITUTION], PolyWrongRegInsCount.[NO_OF_GROUP]
FROM PolyWrongRegInsCount;

PolyWrongRegInsCount; <- This table is one of the queries that I created.However, the data is manually added. I want to get the data from excel spreadsheet. And load into my queries

View 2 Replies View Related

Forms :: Retrieve Info From Another Query - Higher Column Numbers?

Aug 22, 2014

When I attempt to use the me.field = me.combobox.column() method to retrieve info from another query,it only works if I use column 0 or 1... it doesn't work with higher columns number.

- field name: cbofi
- row source: listado-unico-fi <-- it is a query with unique values and 7 fields in total
- event procedure, change:

Private Sub cbofi_Change()
Me.txtDOCTPT = Me.cboFI.Column(1)
Me.campovia = Me.cboFI.Column(5)
End Sub

- txtDOCTPT is the field that indeed works
- campovia is the one that does not work

I tried using column(0) and column(1) and it worked fine... but higher column numbers do not work. Just mentioning because the field names are all right.

View 3 Replies View Related

Help Required For Query

Sep 13, 2007

I need to see the records of a specific date very often. I have designed a simple query (Field : My date field; Criteria : Enter the Date) and it is giving info I want. However, sometimes it shows no records making me wonder where all the data had vanished. On checking up further, I discover that the date I specified was a Sunday, a holiday, when no data entry takes place. What I now want is that if the query returns no records, it should also give a message that "the date you specified could be a holiday. please check" so that I would not panic. Is it possible?
Alternatively, the query can look up the day of the specified date and return the message. I shall be grateful for help for any of these query designs.

View 2 Replies View Related

Query Question Or Maybe VB Required

Sep 12, 2005

Hi All,

I am relatively new to Access having created my first database a few months ago. I have hit a problem and I am not sure if I can solve this with queries or I need to move to Visual Basic.

I want to create a table containing the stock a product for each day for the next sixty days. I have the current stock in one table, a monthly forecast of sales in another and purchase orders in another.

I want to use the monthly forecast divided by how many days in that month and move forward day by day allowing for purchases coming in.

The tables (simplyfied) are :-

Stock Table.
eg.
Code Stock Qty Date
101 10 11/9/05
102 200 11/9/05


Forecast Table.
eg.
Code Month Fcast Qty
101 P09 30
102 P09 90

Purchase Order Table.
eg.
Code Due_Date PO Qty
101 13/9/05 100

The table that I would like to create would contain Code, Date and Stock.

eg.

Code Date Stock
101 12/09/05 9
101 13/09/05 108
101 14/09/05 107 ...........

102 12/9/05 197 ...........

Any ideas/direction would be welcome.

Carl

View 4 Replies View Related

Query Search Help Required

Dec 10, 2006

Hi,

I have my Query looking at multiple colums on a single table.

The table has approximately 2000 records.

I would like to create a Query that searches for criteria in one colum only. I have created a Query and providing i search for exactly what is written then it shows results, e.g. when i seach for Horse Furniture then i get many results but if i search for Horse i get no results?

I would like the search to be dynamic, so when the end user runs the query they are presented with a dialog box asking what they wish to search for (this i have no problems with) however i need to know how to get my query to be dynamic and provide results based upon single information.

is this possible and if so then how?

Thank you in advance for your help, i have been banging my head for a while on this one and am getting no where.

Bev:mad:

View 2 Replies View Related

Query Advice Required

Mar 28, 2007

Hi All

Im after some help with a query im building.

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.

Please can anyone help?
Many Thanks
Dazstarr

View 5 Replies View Related

Query Calculation Help Required Please

May 17, 2007

Hi

I am struggling with something im sure is quite simple.

I have two tables - the first has employee name and each record represents 1 telephone call answered. The second table also has the employee name but this table has a field with calls answered.

What I need to do is crosscheck the calls answered by employee in both tables. For example:

Table 1 has 3 records for John. (This means 3 calls answered).

Table 2 has 1 record for John with a calls answered field which is populated with the number 4. (This means 4 calls answered).

What I need is a report with both these sets of data and a new field with shows the the difference between the two.

Can someone please help me.

Many Thanks

View 4 Replies View Related

Table / Query Help Required

Jan 29, 2008

I have a table set up for training with the following fields. Date, Employee Name, Class Name.

I have entered all the current data. I want the database to tell me who doesnt have a class completed.

I also would like a code to put in my query that will show recurrent date, although there is different recurrent dates dependent on the class.

Any help would be appreciated!

Thanks in advance.

View 4 Replies View Related

Query Problem - Greater Value Required

Jan 11, 2008

Hi everyone.

What I currently have is 2 columns in one table 1 is required and 1 isnt.

However what i need to do is work out the sum value of the greater amount from each line.

IE
A B
1 2
1 0
2 1

which would give a total of 5 as its adding B1+A2+A3

I tried creating a 3rd columb and entered this IF Formula but apparently access doesnt support If formulas

=If([claims]![Mileage1 IR]>[claims]![Mileage1],[claims]![Mileage1 IR],[claims]![Mileage1])

my plan was to get the "IF column to show me the higher amounts which could then be totalled up.

Any ideas where I may be going wrong?

Kev

View 12 Replies View Related

Referenced Crosstab Query Does Not Always Have Information Required

May 11, 2007

My database is built using Access 97.

I have the following table and 2 queries:

Table: “Materials Master Sheet”
field: “Material”
field: “Re-Order Level”
field: “Re-Order Quantity”

Query (crosstab): “Most Recent Count Numbers”
field: “Material Name” (joined to table’s “Material”)
field: “Count Quantity”

Query (crosstab): “Orders Pending Delivery”
field: “Material” (joined to table’s “Material”)
field: “Total Orders”


I am attempting to create a query called "Count vs ReOrder" with the following fields:

1. “Material Name” - comes from “Most Recent Count Numbers” query

2. “Order” - if the inventory count has reached the reorder level point, then 1, else 0; criteria: 1
expression: IIf([Most Recent Count Numbers]![Count Quantity]<=[Materials Master Sheet]![Re-Order Level],1,0)

3. "Suggested Order" - reorder quantity - count of any orders pending delivery; criteria: > 0
expression: [Materials Master Sheet]![Re-Order Quantity]-[Orders Pending Delivery]![Total Order]


This works great if all materials have orders pending delivery. However, if there are no orders pending (material not displayed in crosstab query), the material is not displayed (even though, in reality, the suggested order should be >0)

Currently does this:
material 1 - count = 1, re-order level = 2, re-order quantity = 8, orders pending = 4: shows material and suggests ordering 4 (correct)

material 2 - count = 2, re-order level = 2, re-order quantity = 4, orders pending = 4: material not shown (correct, as suggested order would be 0)

material 3 - count = 2, re-order level = 2, re-order quantity = 4, orders pending = 0: material not shown (incorrect! should be shows material and suggests ordering 4)

How can I go about addressing the missing “Orders Pending Delivery” numbers?

View 2 Replies View Related

Queries :: Getting Required Data Using Query For Calculations To Be Used Later?

Nov 7, 2014

I've been trying unsuccessfully for weeks to try and query a usable data set that would later be used for calculated values in a report.

I'm building a Hospital Acquired Infections Database for my facility to record data and process reports automatically. Previously, I built the system in Excel using VBA and userforms, but the size of the file has become too cumbersome, and now takes too long to process my reports.

So here's the issue.

UNIT_DATA TABLE:
UNIT
INF_MONTH
INF_YEAR
PT_DAYS
CVC_DAYS
IUC_DAYS
VENT_DAYS
APV_DAYS

PT_LEVEL TABLE (There are many fields in this table for recording purposes but I will only list the ones I need for reporting purposes):

UNIT
INF_STE_MAJ
SPECIF_SITE
INF_MONTH
INF_YEAR

So the important numbers I can't seem to collect are the total number infections per month from the PT_LEVEL Table for only select SPECIF_SITE infections.

the Tables are joined Left to Right as Follows:

UNIT_DATA.UNIT - PT_LEVEL.UNIT
UNIT_DATA.INF_MONTH - PT_LEVEL.INF_MONTH
UNIT_DATA.INF_YEAR - PT_LEVEL.INF_YEAR

The UNIT_DATA Table is a monthly collection for the 5 metrics (PT_DAYS, CVC_DAYS, IUC_DAYS, VENT_DAYS, APV_DAYS) regardless of whether or not the number for each is zero. Every unit in the database will have a record for each month and year.

The PT_LEVEL Table will only have records if and when a patient develops an infection. This means there is no cumulative monthly data for the PT_LEVEL Table Data based on SPECIF_SITE infection type.

I need to first do a roll up count for every month and year in the database, for which I was initially trying to use the UNIT_DATA table for since it contains every month and year. The problem is when I try to query the SPECIF_SITE from PT_LEVEL, I can get the number of Infections for months where infections where present for each unit and null values, for each month, and each year in UNIT_DATA, but when I include a where condition to narrow the view to only selected SPECIF_SITE's it only shows data for that SPECIF_SITE for months where they occured.

I need a cummulative monthly aggregation of the totals for a selection of SPECIF_SITE infections, for every unit, for every month, and every year, since July 2010.

View 14 Replies View Related







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