473,396 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Query Lookup

Hi all,

Trying to create a query to get data from a table, but I want the criteria to to use data that is currently in one of the fields.

"Faults reported" is the record
"Fault number" is one of the fields.

I want the query to look at the current record it is on (eg : fault number 23) and bring back all the info for that fault number.

broken down :-

I have a form is called 'Faults'
I am on fault number 23 which has loads of other info on it such as fault number, fault type, fault location, fault reported by, etc, etc

I want to have a button on my form which when clicked will print the data for that particular fault number (report form which I will create the look of).

So clicking the button will print off a report with all the info the record I am currently on. If I clicked file and print it would just print off all 3000 faults in the format shown on the screen.

Hope this makes sense. Thanks for any help

Scott
Jan 16 '07 #1
1 1327
MMcCarthy
14,534 Expert Mod 8TB
Hi all,

Trying to create a query to get data from a table, but I want the criteria to to use data that is currently in one of the fields.

"Faults reported" is the record
"Fault number" is one of the fields.

I want the query to look at the current record it is on (eg : fault number 23) and bring back all the info for that fault number.

broken down :-

I have a form is called 'Faults'
I am on fault number 23 which has loads of other info on it such as fault number, fault type, fault location, fault reported by, etc, etc

I want to have a button on my form which when clicked will print the data for that particular fault number (report form which I will create the look of).

So clicking the button will print off a report with all the info the record I am currently on. If I clicked file and print it would just print off all 3000 faults in the format shown on the screen.

Hope this makes sense. Thanks for any help

Scott
Assuming "Faults reported" is the name of the table.

Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM [Faults reported]
  2. WHERE [Fault number]=[Forms]![Faults]![Fault number];
  3.  
Mary
Jan 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Si | last post by:
Hi there. I have a page on a website I am building where is want to look for all records added in the last 60 days. The date is added in short UK format, that is 25/12/2003 in an access...
10
by: Thomas R. Hummel | last post by:
I have a stored procedure that suddenly started performing horribly. The query plan didn't look right to me, so I copy/pasted the code and ran it (it's a single SELECT statement). That ran pretty...
8
by: djwhisky | last post by:
Hi there - i'm hoping someone can help me! I'm having a problem with a live database that i'm running on MSDE - It seems to have slowed down quite considerably from the test environment (even...
1
by: Robert | last post by:
I am trying to create a db for service providers by county. I'm relatively new to db programming, but I have done quite a bit of programming ranging from the old basic days up to doing some...
2
by: Fendi Baba | last post by:
I created a person table with various fields such as Suffix, Salutation, etc, Some of these fields may not be mandatory for example suffix. In the actual table itself, I only have a field for...
1
by: lorirobn | last post by:
Hi, I have a report that displays summary information, summing prices for all records for a RoomID meeting certain criteria, and printing the roomID and sum on a detail line. Now I want to add...
3
by: shorti | last post by:
Is there a way to use SELECT to reassign the value of a column so it displays differently? For instance, I have a column called status. It is an integer value in the database (i.e. valid values...
1
by: hr833 | last post by:
hi.. i'm using a append query to filter some new records that must be updated in the lookup table. In this lookup table it consist of the part number and the type of the product. the part number...
3
by: zufie | last post by:
I have two drop down boxes, for the fields "County" and "Category" on a form which when selected for the respective County and Category will return Agency Names of Agencies within the respective...
1
by: joeino | last post by:
I want to do a lookup query and append the record to a history table before editing the data. I created a macro to run the lookup query to append the record to history and it works fine. I did the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.