Queries :: Querying Contents Of One Field Against Another Table / Field

Apr 26, 2013

I am trying to perform a search function query in access but am having trouble. I have two tables. One table has a column in which I need to search the contents of this field by referencing data in another field/table. I am able to write the query searching the data manually (not referencing the other table) but can't seem to get the query right when referencing the other table!

this query works =
SELECT *
FROM Sample_Data
WHERE (((Sample_Data.[Affected_Frequencies]) Like "*451.425*" Or (Sample_Data.[Affected_Frequencies]) Like "*451.400*"));

but, i put together a frequency table (Table name = Frequencies) and the column within that I am searching for is called Frequency. im trying to reference Frequencies.Frequency using a LIKE statement.

View Replies


ADVERTISEMENT

Modules & VBA :: Code To Check Contents Of A Field In A Table Where Another Field

Sep 11, 2013

I am trying create some code that checks if the contents of the status field in a table is "Authorised" where the ID = something specific for multiple records. If all records witht the specific ID are "Authorised" Then generate a new record in another table. Where to start, perhaps a Dlookup?

View 1 Replies View Related

Queries :: Querying A Formula Based Field

Apr 8, 2013

I have a field in my query which returns results based on a formula that is a function of other fields. The results are: Pass and Fail. I want to make a query that returns only Fail rows. When I enter Fail as the criteria, a parameter box pops up requesting information be entered before continuing.

View 1 Replies View Related

Queries :: Database Of References - Querying Two Values From Same Field

Aug 23, 2013

I'm quite new to Access and have inherited a database from a colleague. It is a database of references from which we have extracted pesticide active ingredient, pest species and crop species using forms. I am trying to create a query that will allow us to search and return unique active ingredient x pest x crop species combinations (but which will return all instances of this combination).

The complication is that the pest and crop species names are within the same field ('taxa'). They are distinguished by a label ('pest' or 'crop') in an associated field ('PestorPredator'), but a query using 'OR' will only return a crop OR pest, whilst a query using 'AND' will return no records (because something can't be a pest AND and crop).

I want to be able to create a table that shows the active ingredient, associated pest species AND the associated crop species each in separate columns. We have tried a couple of methods, including UNION and UNION ALL....

View 2 Replies View Related

Queries :: Querying Dates Between A Start And End Date Field

Aug 25, 2014

I have a db tracking vacation times for staff. One of the fields tracks a members vacation start and end dates. I need a way to pull a report to see who is on vacation based on Date() (today).

For example:

A record for John Doe has him start vacation 08/19/2014 and end vacation on 8/28/2014. If I wanted a report that shows who is on vacation today, 08/25/2014, using the date() function), how would I do this?

View 3 Replies View Related

Querying Two Inter-related Field In A Table

Jun 16, 2005

Hi,

Need some help. Here's the problem:-

I've two fields in a table (A & B)

A B
1 Null
2 Null
3 1
4 2
5 3
6 5
7 Null
8 4
9 6

The fields are somehow related where values of B (unique) is taken from A(unique).
I trying to do an SQL such that if I input a single value A=9 or 6 or 5 or 3 or 1, the following should be the output:

A B
9 6
6 5
5 3
3 1
1 Null

Or in another case where I input a single value A=8 or 4 or 2
the following should be the output:

A B
8 4
4 2
2 Null

How can I do that? Many thanks in advance!! :D

View 3 Replies View Related

Removing Parentheses And Its Contents From Access Table Field

Jun 18, 2014

I am very new to access less than 1 week since i started trying to build an horse racing database, i am trying to link data from 2 different sources via the horses name however one source displays this with the horses country of origin in parenthesis foe example FRANKEL(GB) and the other source displays the name as just FRANKEL, to be honest i haven't yet tried the link but guess it will fail.

I am therefore looking to get rid of the parentheses and their contents from an access table field and create another field without them.

In Excel i use the formula B1:

=TRIM(REPLACE(A1,FIND("(",A1&"("),FIND(")",A1&")")-(FIND("(",A1&"(")-1),"")) and that works fine.

I guessed the solution for Access would be newname:

TRIM(REPLACE([frhorse.NAME],FIND("(",[frhorse.NAME]&"("),FIND(")",[frhorse.NAME]&")")-(FIND("(",[frhorse.NAME]&"(")-1),""))

But this doesn't work as in returns undefined function "FIND" in expression error.

View 7 Replies View Related

Put Contents Of Field Off Table On Report Based On Date

May 24, 2012

I have fairly large table called QBInvoices that consist two fields- qbinv and date . Also, I have a report that showing info off query called TotalQueryQB. The table and query have no relations except dates . I need to show on report filed qbinv off table QBInvocies on the top of the reprot based on date. The user type date on form -frmQB text box txt Date and I would like to have contest of field qbinv off table QBInvocies on the top of the report base on date that was typed.

View 2 Replies View Related

Contents Of A Field Based On The Contents Of Another Field

Jul 14, 2006

Hi,
I'm making a form where the contents of a field is determined on the contents of another field in another form. I thought an IIF function would work, but when I tried it the contents says #NAME.

I put it in the control source.

IIF([Forms]![Frm_NewBusiness]![Page4]![Child51]="NTU",NewBusiness_Date_Issued="NTU",NewBusiness_Date_Issued)

Any ideas?

Cheers,
Ben

View 1 Replies View Related

Creating A Table Of Contents / Index / Need Macro To Create A Field

Apr 4, 2014

I have a situation where I have a report which I will generate to print our companies pricebook. I need an index/table of contents for customers to go to the page where a product is to look up prices. The problem is that we add and subtract products on a consistent basis.

So a new product will get added, but of course, to run alphabetically, there's no way to insert it, then renumber the pages for it to be easily found.to use a maketable query, which sorts all of the products alphabetically. Each time it is run, it will delete the previous table. I then need to have an autonumber field created to create my "page numbers". Yes, each time the pricebook is run, products can and will oftentimes get new page numbers.

So my thought is to have a macro run which creates the autonumber field to the table. This will then be the basis for the form, which will in turn utilize the "page number"/autonumber field to both serve as page numbers in the report. And of course, the table which is created each time will be the "table of contents".

View 5 Replies View Related

Reports :: Average Contents Of A Field Based On Another Field

Oct 2, 2013

I have a report that has multiple fields - 3 of which matter for this discussion -

1.) employee
2.) employer
3.) rateofpay

The employer field contains 1 of 2 options. For the sake of this conversation, lets call it ABC123 and XYZ123

I need to be able to calculate the average rate of pay for ABC123 company, and exclude the rate of pay for XYZ123 company in my report.

I am calculating this in a section footer.

View 2 Replies View Related

Queries :: Form Field Return A Null Then Look At Field In Table

Jun 10, 2013

Trying to run a query using criteria to populate the query by looking at information from a field on a form, if from is closed I need that criteria to look at the table and return all date in table.

View 14 Replies View Related

Querying Out Even And Odd Number From A Field

Jun 23, 2005

Can anyone tell me how I can query a number field for odd and even number. I have table with a field that contain only number which I would like to query out all the odd and all the even number to be able to print on a report.

View 1 Replies View Related

Querying A Formula Based Field

Apr 8, 2013

I have a field in my query which returns results based on a formula that is a function of other fields. The results are: Pass and Fail.

I want to make a query that returns only Fail rows. When I enter Fail as the criteria, a parameter box pops up requesting information be entered before continuing.

How can this problem be rectified?

View 11 Replies View Related

Querying Time Stamped Date Field

Sep 2, 2007

Hi,

I use a query to return values between two dates, here's the code I use:

Between [Select Start Date:] And [Select End Date:]

However because my dates are time stamped (they need to be!) the query omits anything on the end date, for example:

Between [01/09/2007] And [05/09/2007] will return values for the 1st, 2nd, 3rd, 4th but not the 5th - because (I think I'm right in thinking this but I might not be!) it only returns values upto midnight on the 4th? so 05/09/2007 13.42pm won't show up because it's after 11.59 on the 4th.

I can't ask people to enter in an extra day because quite alot of people who use our database won't remember and it'll cause alot of problems when they forget and get the wrong figures.

I've tried adding the following:
" & "11:59:59""

onto the code but Access says the expression is typed wrong or is too complicated to be evaluated.

Does anyone know how to fix this code please??

thank you for your time

View 12 Replies View Related

Dynamic Field Contents

Sep 1, 2006

Is there a way to make the value of one field change dynamically based on the values in other fields on the form?

Here's the general idea. I have two tables.

RecordTable
--------------
SiteID, etc.

SiteTable
-------------
SiteID, SiteBlurb

I want have a form, where you can change the SiteID value in RecordTable, and have the SiteBlurb change (i.e. the form pulls the information from SiteTable) dynamically once you have entered the new value.

View 1 Replies View Related

Nullifying A Field Contents?

Jun 18, 2015

is there an alternative to making a field blank, other than my old trusty <Me.Field1 =""> ... ?

(my use of the < and > are purely for demonstration purposes, and do NOT get used in code)

I'd like some fields to be native, virgin, blank, et cetera... I do find sometimes I have to overly complicate a VBA statement by putting.. <If IsNull(Me.Field1) or Me.Field1 = "" then> because I have made that field value = "" to blank it out.

View 3 Replies View Related

Querying A Memo Field Only Returns Part Of Info

Jun 8, 2005

Hello All

Has anyone ever encoutered a problem where when running a query to return a dataset which includes a memo field, the query only returns part of the info contained in the memo field?

Do queries limit the return of memo field data to 255 characters? I have run other queries on other memo fields in the past, and do not recall ever having this problem.

FYI, there is no indexing, criteria or joins/relationships on the memo field - whilst returning other fields, I purley wanna return whatever is contained in the field.

Any ideas?


Cheers

View 5 Replies View Related

Querying An Empty Date Field With IsNull Problem

Jun 15, 2005

I am using the QBE grid and am writing a select query to select only records with an empty Date Closed Field. The Date Closed field is a Date/Time Field. I am using Access 2003. When I use in the criteria IsNull([DateClosed]) I do not get any records selected which have an empty Date Closed field, have I a bug? and if so please could anyone point me in the right direction.

View 4 Replies View Related

Automatic Count Of Field Contents

Jan 11, 2007

My company requires a query to aid distribution, however I am experiencing some problems implementing the system.

We have purchased a large database of addresses and need to be able to query a town/street to find out how many houses are in that street.

I have the query and form set up to display the street/town and list of house numbers when searched for, however the houses are grouped by postcode rather than street, with multiple house numbers in the same field (see example).

Street
Main Avenue

POSTCODE
HG23 0DF

Houses
89;91;93

POSTCODE
HG23 1DF

Houses 95;97;98


----

Basically, I need a total of how many individual houses there are in a street, regardless of postcode. In this case, it should treat the ";"s as dividers and return the result of '6'. Or in some cases ignore the semicolons as some fields look like ";;;;;;;;13". It should then add both the total for one postcode to the other postcode to display a complete total of houses in one road.

Can anyone make any suggestions?

Thanks in advance,
Matt

View 1 Replies View Related

Separating Field Contents By A Delimeter

Feb 21, 2008

HI

Is there a way that i can split the fields based on the delimiter that i will set in a query?...

for example : 088H-FJAKSDF-SAFN-F

in that case additional four columns will be added becuase it will be separated by a dash (-)

thanks so much for your help.

View 14 Replies View Related

Delete Field Contents Automatically

Oct 14, 2004

Here is one that I could use some help with.

I have an Updates field in all of my tables. It, of course, holds my audit trail. Im tryiing to figure out a way that I could run a single command and clear the contents of all the Updates fields on all the tables in my db. Ideally, I'd like to auto generate a report for all the update fields on all the tables, then do a purge.

Any ideas?

View 4 Replies View Related

How To Update A Field With Contents Of Two Other Fields

Jul 3, 2012

I'm an excel user and in using excel I can take two fields and combine their data in one field. I've got about 6 database files with anywhere form 1000 to 3000 records that have already been prepared and imported into access database files .mdb and I realize that the firstname lastname fields need to also be combined into a contact field with both names. In Excel it's easy in access I'm a little lost. I was looking to an update query however I can't find instructions on what I'm trying to do.

View 2 Replies View Related

Print Text Based Upon Field Contents

Jun 23, 2006

I want to print text based upon the content of the field but need more than the IIF statement. For example, if the field contains an "A" I want to print "Active", "C" I want to print "Closed", "N" I want to print "New", etc.

Thanks in advance for any help. You guys have always had an answer in the past!

View 1 Replies View Related

Viewing Entire Contents Of A Text Field

Oct 25, 2004

I am trying to view the contents of a text field in a form. The field can only be a limited size in the form, but I want to store a lot of text in the field and have it visible without having to enter the field and use the arrow keys to view the contents. Is it possible to programme a function that shows the contents of a field when I roll the mouse over it or something like that? The "Control Tip Text" is the principal of what I am trying to do except this gives a fixed value. When used in web page development I think this function is refered to as "Alt tag"

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







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