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 Replies


ADVERTISEMENT

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

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

Tables :: Autopopulate Field Based On Contents Of Another

Sep 12, 2013

I am in the process of revamping an old database. I have a main table that currently has two fields "Name" and "Job" but will have more. I have another table with the same fields. I want to use as a lookup to populate the main table with a user form from the second table. I can populate the "Name" field using a combo box, but my problem is how to autopopulate the "Job" field. E.g. If the user selects Mr Smith from the "Name" drop down list, the corresponding "Job" populates the second field.

View 4 Replies View Related

Restricting Data Entry Based On The Contents Of Another Field

Sep 22, 2005

Hello,

I have two tables which contain the following fields (simplified);

Table 1:
ID
Startdate
Enddate

Table 2:
ID
Unitdate
Treatment

The tables are related (one-to-many) through the ID field.

In operation, the user first enters the Startdate and an Enddate for a patients' hospital stay in Table 1. Following this, the user enters the Startdate again in the Unitdate field in Table 2 and selects a Treatment from a drop-down list. After this, the user enters the following in the Unitdate field and selects a treatment. This is repeated in consecutive order until the Enddate is reached.

The end result looks like this;

Table 1:
ID Startdate Enddate
123456 01/01/2005 04/01/2005


Table 2:
ID Unitdate Treatment
123456 01/01/2005 Ventilation
123456 02/01/2005 Ventilation
123456 03/01/2005 Haemofiltration
123456 04/01/2005 Ventilation

Does anyone know if there is any way to restrict the Unitdate field in Table 2 to only allow dates to be entered that are between the Startdate and Enddate fields in Table 1? Ideally, I would like the Unitdate to populate automatically with the dates, starting with the Startdate value and ending with the Enddate value and filling in all the intermediate dates. Also I would like to make sure that there is no way of having duplicate dates in the Unitdate field.

If anyone can help, I would be extremely grateful.

Best wishes
Russell

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

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

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

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

Modules & VBA :: Using IIF Statement To Search A Field For Contents

Dec 18, 2013

I need to use an iif statement to search a field (column) for a certain word. The field is in tblEquipmentName and the input is in tblWorkReport

Ex.

iif(input from tblWorkReport is in field from tblEquipmentName,...,...)

View 1 Replies View Related

Memo Field, Will Show Only Partial Contents On Query

Mar 24, 2008

Running 2007

I never ran into this problem before.
I have a qry, with showing totals (group by). One of the fields is called comments, which is a memo field. I am only seeing partial comments.

When I redesign the query and take out the "totals", I see the entire comments.

Is there a fix to this?

View 4 Replies View Related

Modules & VBA :: SQL To Copy Field Contents With Reserved Characters

Jul 11, 2013

I've got some code that loops through a record and copies the non-null fields to another record. This is the partial code:

For Each fld In tdf.Fields
If Not IsNull(Forms!contact_lookup![Contact_sub subform1].Form(fld.NAME)) Then
strSql = "UPDATE tbl1 SET tbl1.[" & fld.NAME & "] = '" & Forms!contact_lookup![Contact_sub subform1].Form(fld.NAME) & "' " & _
"WHERE tbl1.[FC_APN] = '" & Me.txtApn & "';"
DoCmd.RunSQL strSql
End If
Next fld

This works fine until it encounters a field whose contents has a reserved character, like a single quote (" ' ") in it, for example, "What's the what." At that point the SQL thinks there's a " ' " missing in the statement, and I get an error 3075 (syntax error: missing operator).

View 2 Replies View Related

Reports :: Total Field Contents Not Visible Until Click On It?

Oct 2, 2013

Imagine that you see a column of values and then a total at the bottom. The only issue is that the total value does not appear until you click on it.

Any setting that would cause a total value in a footer section to not appear automatically?

Behavior is noticed on reports as well as subreports. An image is attached.. Imagine the $37,000,000 simply not appearing until it is clicked with the mouse.

View 7 Replies View Related

Forms :: Refresh Contents Of DLookup Field On A Form

Aug 10, 2014

I have a field on a form that is the results of a dlookup to a table.field. I want the value to be updated when I execute a button that is running a macro. How do I do this automatically, and not have to hit the refresh button?

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

Forms :: Loop Through A Datasheet And Copy Contents Of One Field Into Another Form

Apr 19, 2013

I am trying loop through a datasheet so that I can copy the contents of one field into another form.

I have tried using the bellow code to do this on a button click event. However when i run it I get an error telling me that the object doesn't support this property or method. Im not quite sure what this means.

Dim rst As DAO.Recordset
Set rst = Forms![Roll Out - Site Form]![Roll Out - Sign items pick list].RecordsetClone
Do Until rst.EOF
[Roll Out - Sign items added].Form![Code] = [Roll Out - Sign items pick list].[Form]![Item Category]

Loop

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

Making Form Buttons Visible/Invisible Depending On The Contents Of A Field

Oct 23, 2004

I am trying to make a button on a form visible and invisible dependant on the contents of a field in my form, any ideas?

View 3 Replies View Related

Selecting A Name Based On Table Contents

Apr 25, 2008

Hope this works, The table is as follows, ish

Name1 y/n1 y/n2 y/n3 y/n4 y/n5
a...........y......y....n.......n.....n
b...........n......n....y.......n.....y
c...........y......n....n.......n.....n
d...........n......n....n.......n.....y
e...........y......y....y.......n.....y
f............n......y....n.......y.....y
g...........y......y.....y......y.....y


what i need to be able to do is take a form/query answer some questions, y/n1= y/n2= y/n3= ......

Then off the back of this be able to pull out the correct item from column name1.

But i don't need an exact match on all columns. If i am only interested in y/n2=y i need to display all matches

My head says the following If y/n2=y and y/n3=y Then Name1 = e and g
or another example if y/n2=y and y/n4=y and yn5=y Then name1 = f and g

if a y appears in more columns it doesn't matter but it has to be in all those columns i am looking at

can anyone suggest the simplest way forward on this.

View 1 Replies View Related







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