Query - Lookup/Query Repeating Data Entery

Nov 28, 2006

I am creating a database for a hyperthetical car hire company.

I have a field with a lookup/query. The data that this query searchs for is entered into my table/form already. Is there anyway of avoiding repeating this data twice?

Iain

View Replies


ADVERTISEMENT

Repeating A Query On Query Returned Data?

Apr 1, 2008

is it possible to repeat a query on data returned by the same query while returning it to a single table?

i have a query that runs on the following info:
PartNumber - the part number of an item
AsmNumber - the part number of the item the part belongs to
IsAsm - true/false on whether or not the part is an assembly

(see attached database)

the current query, when 11135 is used as input, returns 11124, 11165, 11103, and 11155. likewise when 11165 is entered the query returns 11109, 11110, and 11111.

i would like the query to return 11124, 11165, 11109, 11110, 11111, 11103, and 11155 when 11135 is entered.

the sample database attached is stripped down but accurately reflects what i'm working with. i do not know how many sub-assemblies belong to a top-assembly (could be zero, one, or sixteen), therefore i think the 'sub-query' would use the 'IsAsm' value as some sort of criteria - yes?


if what i'm asking is impossible, i'm very open to suggestions as long as they work with the data given.

i appreciate any help (especially being this is my first post) and apologize for the verbose post, i'm not good with brevity.

View 4 Replies View Related

Queries :: Access 2010 Query Is Repeating Data

Jun 10, 2015

and I have several queres using the same table. I was trying to add 2 columns and fields to my 1 querie. I do not use program much but I have it for my cattle. SO I was clicking around. Went to Table and went to add the field.I changed my Primary Key field then realized I should not have done that.I changed it back to "ID" and "Number" and added my fields. THEN I went to the one querie and added my columns and fields.However NOW the one querie I messed with has 30,888 rows as it just repeats the 20 or so rows over and over .The other queries do not and they use some of the same data "ROWS" from the table

View 1 Replies View Related

Help With Data Entery

May 4, 2007

Hello,

I have two tables, tblEmployees, tblEmployeePayment. tblEmployees has the following fields.

EmployeeID
Name
Salary
Status
Employeegroup

Data for this table comes from our payroll system. The other table, tblEmployeepayment, which has many to one relationship with tblEmployees has the following

EmployeeID
PayPerioddate
Paybegdate
Payenddate
Salary

data into this table is entered by the users. The reason I have salary on this table is becasue I want to keep the salary history for each payperiod. So if an employee get a raise in May I want to know how much he was paid in April. What I would like to do is papulate the salary field in tblemployeepayment based on tblemployees. I don't want to do lookup because we get new updated tblemployees everymonth. I tried to do an update query but I couldn't figure it out how to update this field.

View 14 Replies View Related

Lookup Data In Another Query

Sep 14, 2006

Hi Folks
I have a form that is based on a query.
I want to change the unique ID that is displayed on this form.
The new ID is sourced from a different query. I.E. Not the same query that the form derives its information.

I have set the data source property of the field (Combo1) to the "other" query.

How do I get the Combo1 to update to the value of the first record?
Currently its defaulting to Null.

I have tried using :
Me.Combo1.Requery - This does NOTHING to the vaue.
Me.Combo1.MoveNext - I keep getting a "Method or data members not found" error.

View 7 Replies View Related

Repeating Query

May 12, 2006

As posted here
http://www.access-programmers.co.uk/forums/showthread.php?p=489795#post489795

I thought its better to mention it here as well:

How do I get the query to repeat itself to gernerate extra rows of info.

I have "[Enter Ingredient Code]" in the criteria section on one column, this gives me a popup when starting the report to enter the code. I would like to have this reappear to enter more information. Maybe the action to with another pop up box like

"Would you like to add another ingredient"
"Yes" "No"

Click on yes and the query will rerun and enter the data in, select no and the report is made.

M

View 1 Replies View Related

Repeating Rows In A Query?

Mar 27, 2014

I am attempting to perform a normalization process in a query where an organization would be operating in several different states and different countries. I have created three tables where: one table is Organization, second table is Country, and the third table is State. I made a table to record: Organization ID, Country ID and State ID. An organization could have 1 or more countries while having no US states. Also the organization could have 1 or more countries while having 1 or more US states.

What I am seeing is in my query is:

Organization | Country | State
Organization | Country | State
Organization | Country |

What I am wanting to see is:

Organization | Country, Country, Country | State, State

In the end, I want to make a mail merge from this query table.

How can I 'normalize' the query?

View 1 Replies View Related

Tables :: Possible To Automatically Lookup Data In A Table Without A Query?

Jun 18, 2013

A field in a table can be populated by a lookup up but it has to be done manually or with a form.A "new" table can be created with a query that matches the data.

Is it possible to skip these steps and create a field that automatically populates with the data from another table based on other common data?I can do this in Excel but not sure it can be done in Access.

View 1 Replies View Related

Forms :: Repeating Input In All Query Records

Nov 3, 2014

I have a query that I am running based off two tables. To one of the tables I add a few blank fields as my boss wants me to calculate the accounting portion. I work at an budgets unit but as IT. Anyways, I ran the query and opened it in a form for the Analyst to input their numbers. So every other field is calculated. A + B = C.

I have something in field A and I am putting the input in field B to get teh results in field C. So that's say that I queried for a certain analyst and I get four records. When I input anything into first record the input is in all the records for field B. This is where I am having a problem. I only want to input into the the corresponding record and not all the records I query.

View 14 Replies View Related

Queries :: Creating Query Without Repeating Duplicate Relationships

Feb 13, 2014

I have two tables that look like this:

Table 1

LOCATION NUMBER , SIZE
1.12 ,100
1.13 ,100
1.14, 12
1.15, 12
1.16 ,150
1.17 ,150
1.18 ,100

Table 2

ITEM , SIZE
A , 12
B , 12
C ,100
D ,12
E ,100
F ,100
G , 150

I would like to do a query that Joins the "Size" in each table, and then matches an "Item" to a "Location". However, because of how a normal join works, I cannot seem to figure out how to limit the "Location" field from producing duplicates in the match.

I only want to have 1 location for every 1 Item.

View 6 Replies View Related

Queries :: Correlated Query Returning Only 1 Record And Repeating

Aug 10, 2014

I have SQL query/dual sub-query in MS Access that is returning data from the left side of the query FROM correctly, but is only returning one record from the right side of the query FROM. Furthermore, it repeats the display of the one record and it repeats the entire results set with a different one record each time until all the records have been displayed. I expect that problems described as "Furthermore" will not exist by fixing the one record issue. I have tried using all the join types available in MS Access, but none change the result.

The desired output is:
Yellow Blue
11/23/2013 11/19/2013
11/19/2103 10/01/2012
10/01/2102 10/08/2010
10/08/2010 12/14/2007

The actual output is:
Yellow Blue
11/23/2013 11/19/2013
11/19/2103 11/19/2013
10/01/2102 11/19/2013
10/08/2010 11/19/2013
11/23/2013 10/01/2102
11/19/2103 10/01/2102
10/01/2102 10/01/2102
10/08/2010 10/01/2102

The same pattern is repeated 2 more times with Blue values of 10/08/2010 and then 12/14/2007.

Here is the SQL:

SELECT Long_List.Yellow,Short_List.Blue
FROM
(
SELECT DISTINCT BirthDate AS Blue
FROM (
SELECT DISTINCT BirthDate FROM citizens
UNION

[Code] ....

View 11 Replies View Related

Repeating Data

Dec 6, 2006

Here we go again i have another problem.

I am finding it very hard to explain my problem so i have attached a copy of my database:

Have a look at NUMBERPLATE OPTIONS in the booking table. When you click on this field you have to type in the END DATE and the CAR TYPE to generate a list of numberplates that can be selected. This END DATE and this CAR TYPE have already been enetered into the BOOKING TABLE for this particular record. Is there anyway of repeating this data entery?

Iain

View 4 Replies View Related

Import Repeating Data In Txt File

Dec 2, 2004

I have read lots about importing files but can't find anything on how to handle importing data that repeats itself in blocks from with in a txt file.

Note that I intend to run the import as an event each time the db is opened.

the data is an audit log that looks like this:

Date: 12-01-2004 Time: 11:16:57
Transaction #: 061318 Cashier ID: NB
Computer: COUNTER2
Sale Recorded. Transaction Total: 2.5

Date: 12-01-2004 Time: 11:20:55
Transaction #: 061319 Cashier ID: NB
Computer: COUNTER2
Sale Recorded. Transaction Total: 5

Date: 12-01-2004 Time: 11:59:48
Cashier ID: RC
Computer: COUNTER2
Deleted All Lines From Transaction

Date: 12-01-2004 Time: 12:01:17
Cashier ID: RC
Computer: COUNTER2
Opened Cash Drawer--NoSale

Whats the best way of doing this.

Cheers

View 4 Replies View Related

Repeating Data From Prior Record

Mar 16, 2005

I have users who use a form to enter data. One of the fields is "DateRange". The users tend to enter records in groups. The group of 10 records will all have the same "DateRange" As they start a new record is there a way that the "DateRange" field can copy from the prior record?
Any help would be great!

View 8 Replies View Related

Using D Lookup In A Query?

May 24, 2005

I am trying to work out the total labour cost of employees work.

I have the following tables that holds the information.
(Sample of field names relevant to this problem)

The relevant tables are as follows;

tblTimeCard
-TimeCardId
-EmployeeId
-DateWorked

tblTimeCardHours
-TimeCardId
- Task
-Hours

tblPayRates
-EmployeeId
-DateFrom
-DateTo
-PayRate

What I am trying to do is run a report that identifies the total labour cost at the time of entry of the Time card. (The pay rates will be changing regularly and I need to calculate the cost with the correct payrate at the time they worked).

This is to be calculated by the number of hours stated in the tblTimeCardHours, against the employeeId from the TimeCard and retrieve the Payrate amount depending on the DateWorked in the tblTimeCard.

I have thought that I would need to use Dlookup to get the amount from the tblPayRates for the date but I am a bit stuck as I am new to this concept and not sure if this is the best way forward. I would be most grateful if someone could point me in the right direction please...

View 3 Replies View Related

Lookup Query

Oct 31, 2006

I have a table linked to a sql database, I want to run a query that will only show certain depots but not sure how.
i.e weston,london
I can run a query that will work if I put in a single depot but I need a query that I can have serveral depots

View 1 Replies View Related

Lookup In Query

Jan 15, 2007

hi all,

I am trying to write an updte query and 4 of my fields are lookup to a table called option (which is a yes/no/NA table). Can i have the yes/no/na table in my query linked to each of the 4 fields in my entry table. I have named the i.e. FDD: option, CD-ROM: option, DVD-ROM: option, CD/RW: option. But when i save the query and then go back into design view there is only one column for the option field with criteria: "yes" And "no" And "no" And "yes".

Do i need to have a seperate lookup table for each of the 4 fields in the entry table for this to work?

cheers,
spinkung.

View 1 Replies View Related

Query - Lookup

Sep 10, 2007

Hi,

I have a table which holds various time stamps for a booking in process.

I'd like to create a query that only picks up a specific timestamp if another timestamp has not been updated

For example -

5 15:31
8 15:37

I'd like to only lookup timestamp 8 when timestamp 5 is not in the table

How would i go about doing this?

View 2 Replies View Related

Lookup Query - Help Please

Mar 28, 2008

Hi All,

I have a problem in Access which is beyond my limited knowledge. I have two tables (one the result of a query and the other a fixed table).

My ultimate aim is to obtain a list of distances between two points for multiple sets of sites. The query gives me the 'a' end site location and the 'b' end site location, and the fixed table shows all the possible combinations of 'a' end to 'b' end distances. So, I have a table that shows all the possible distances from London to every other city, and from Birmingham to every other city etc etc and am looking to see how far it is between the specific sites in returned in my query table.

In excel I would use a Vlookup table on a single instance, but I am not sure how to translate this into a query that combines all the variables.

In logical form I am looking for something that says:-
if query field a = table field a AND query field b = table field a then return table field c.

There are multiple occurrences of data within table fields a and b, so a join won't work according to my limited knowledge of joins.

I don't think I'm explaining very well, so please feel free to probe for further detail, but I would really welcome any suggestions.

Many thanks,
Jason

View 7 Replies View Related

Parameter Query From LookUp

Jun 15, 2007

Hello,

I'm trying to get a report based on a parameter query to work. The report is to view all contacts on the database who have been assigned with a particular "Contact Type" - i.e. client, supplier, volunter etc.

These Contact Types are themselves sourced from a LookUp table. Unfortunately this means that when I run the parameter query it doesn't recognise any contacts as being "client" or "supplier" etc, but does display them when I enter the ID number which has been assigned to those Contact Types - this means that unless I know all "clients" have the ID of "5" etc., the parameter query won't work.

Is there a way around this, which doesn't involve me having to make big changes to the LookUp table and associated relationships?

View 5 Replies View Related

Query, With Lookup Fields

Feb 11, 2008

Hi,

I have a table that has 3 columns.

Issue, Review, and Information.
These 3 fields get their data from the same lookup table that holds some code values.

So I'm trying to create a query to export to excel that shows the data for this table, but for the lookup fields, I just get the ID's from the lookup table.


So the table is like this now

ID...Issue...Information....Review
1.......2..........5...............1
2.......1..........12..............6


So I would like to be able to display what the ID numbers actually are, but having trouble getting a query to do this for all 3 fields.

I can run a query that shows 1 field's but not all 3.

what I would like to see

ID.....Issue...Information....Review
1.......2a.........4c.............e5
2.......1a.........3c.............2F

all 3 columns use code_ID from the lookup table.

Is there a way to do this? or should I have used 3 different lookup tables for these?

View 13 Replies View Related

Textbox Query Lookup

Oct 26, 2005

Hi there,

I usually code in .net or asp, but am building a system in pure access.

I want to do the following from a textbox on a form....

1) Lookup all values in a table that match textbox.value *
2) lookup all values that matach * textbox.value *

I want to display the values that match textbox.value * first

So far I worte a query that has a parameter of Like ([Forms]![formname]![txtname]+"*")
Yet I'm unsure as to how to get the query to display the ressults in the format I want... can someone help please?

M3ckon

View 2 Replies View Related

Auto Query Lookup

Aug 20, 2004

I am new at creating databases, and I have the jist of creating tables. But my boss wants me to create a database that notices two fields such as (Item and Size) and when I enter and Item such as Helmet and then small for the size, he wants the (NSN-national stock number) to appear which consists of 11 digits. I viewed other forums and usually in a form in Access you enter a number and the rest of the information appears. However I need the autolookup to recognize the text and output the number. I understand that I have to create a table that contains all of the information so it has something to refer to. I am not familiar with Visual Basic, to write a program code. Second, I he doesnt want the information to appear in a form, but in a query. If anyone could please help, I would greatly appreciate it, because I am pressed for time.

View 1 Replies View Related

Parm Query/Report Lookup

Dec 15, 2005

Hi,
I have a report by department that the user needs to enter in the department name to produce the report(Parm.Query). I have tried to make it somewhat easier via wildcards but if they still don't know exactly how the data is stored, they will have a hard time. Example: Labor and Delivery is stored in the table as L&D. Is there a way to use a dropdown/lookup to select the department to run generate report?? I know this is very basic but I am having a "No brain Day" Thanks in advance!!!! Rick

View 4 Replies View Related

Lookup Query For Related Tables

Sep 9, 2005

I have a table of 'things' and two related tables, type and subtype. Each thing has a type and a subtype. The types table contains simply Index (autonumber) and Type (text). The Subtype table Index (autonumber), type (number) and subtype (text), where index and type form the primary key and type is a foreign key to the types table. Thus each type has its own sub-set of subtypes.
In the design of the Things table I have set the lookup for Type and Subtype to be a dropdown, but of course the subtype drop-down shows all subtypes, not just valid ones. If I select a subtype that is incorrect for the selected type then of course I get an error, but it would be nice to set the query in the subtype lookup's Row Source to just display the valid subtypes. At the moment it just says "SELECT index, type FROM subtype" How do I put in a WHERE clause that references the Type field for the current row: "SELECT index, type FROM subtype WHERE type=<type selected in current row>"?

View 3 Replies View Related

I Need Query To Lookup Records For This Year Only.

Sep 18, 2005

SELECT Loans.CustomerID, Loans.LoanID, Loans.LoanAmount, Loans.StartDate, Loans.EndDate, Loans.LoanLender
FROM Loans
WHERE (((Loans.StartDate)>DateAdd("d",-32,Date() And ((Loans.EndDate)>DateAdd("y",-1,Date())))));

I want my query to do a monthy lookup of bussiness where a loan is either opened or closed in the last 32 days. This works except its pulling up records from all previous years. I tried to filter the year as shown above, of course its not working. So what do i have to do? Thanks for any help in advanced.


Scott

View 7 Replies View Related







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