How To Make A Reference To Another Column In The Same Query?
Jul 19, 2006
Hey Guys!
I have a problem concerning the ability to make a reference to another column in the same query.
I have two columns. Column 1 works perfectly, but in column 2 I want the outcome of column1 (coachingdato1) inserted instead of #17-07-2006#.
How is that done???
Thanks in advance!
//JR
Column1:
coachingdato1: (SELECT Max(coaching.dato) FROM coaching WHERE sælgerdata.sælgernr = coaching.sælgernr)
Column2:
coaching1: (SELECT coaching.[1] FROM coaching WHERE sælgerdata.sælgernr = coaching.sælgernr AND #17-07-2006# = coaching.dato)
View Replies
ADVERTISEMENT
Jan 30, 2006
I use a Make-Table Action query to import data from a linked table into my database. The linked table is on a network server that is automatically updated.
One column of the linked table is named "QTY/PARTIAL" and approximately 10% of the 500 records have a "P" after a number i.e. 1000 P. I would like to separate the number and the P into separate columns in the new table to faciliate being able to compute the total number "QTY".
Thanks,
Gunner...:confused:
View 12 Replies
View Related
Mar 19, 2013
I have a form that has a combo box (box1), Its row source is from a table (table1) than the forms record source (query1). The data box1 sources is from column1 in table1.
I then have a text box (box2). I need it so when i select a record in box1 (from column1) that it displays the corresponding data in that same record (and table) but from column2
Example:
A table has a column with equations and another column with the answer.
I select "1+1" in the combo box
Then in the text box it displays "2"
View 1 Replies
View Related
Feb 3, 2015
Basically I have this formula in excel and i'm trying to recreate it in access but i can't quite figure it out.
****a***********b**********c*********d*********e** ******f
3**Car***Cost Center****start****combining*****end*****miles
4**001*****aaa********021****=(A4&" "&C4)***030
5**002*****bbb********030****=(A5&" "&C5)***035
6**002*****aaa********035****=(A6&" "&C6)***040
f4: =IF(COUNTIF($D4:$D600,D4)=0,(E4-C4),(E4-C4)/COUNTIF($D4:$D600,D4))
f5: =IF(COUNTIF($D5:$D601,D5)=0,(E5-C5),(E5-C5)/COUNTIF($D5:$D601,D5))
f6: =IF(COUNTIF($D5:$D601,D5)=0,(E5-C5),(E5-C5)/COUNTIF($D5:$D601,D5))
So basically: If a car is using multiple cost centers for a trip it divides the total mileage among the cost center for said trip provided that the user enters the same start and end mileage on all the cost centers used. And if it doesn't have multiple cost centers it provides the appropriate amount.
=IF(COUNTIF($D4:$D600,D4)
=IF(COUNTIF($D4:$D600,D5)
=IF(COUNTIF($D4:$D600,D6)
and so on
Any way to reference a column in access while referencing a specific point within that column.
View 2 Replies
View Related
Sep 10, 2015
I have created two tables, I want to copy one column from one table to another table column with repeat value in rows.
example :- copy "Material number" column from Table1 to Table 2. In Table 2 Material number will repeat in 20 rows.
Like in excel we give one cell reference to multiple rows.
How I can link table and give reference of column.
View 1 Replies
View Related
Sep 25, 2006
I'm currently working with a form, which is in datasheet view. I have many rows which are combo boxes (yes/no), and the name is rather long. So each line (each row) spreads on to 2-3 pages to the right.What I would like to do is make the namebar, on top of every column, a little bit higher, so the name would be split into two lines, or three. Allowing me to make the width allot smaller.Here is an example of my problem:http://213.213.137.96/~terminal/columns.jpgSo my question is, can I change the height of the column name? Or is there some trick I can use?regardsFrímann Kjerúlf
View 1 Replies
View Related
May 20, 2007
I have 5 columns in ms access. They are as follows:
date_from, date_to, season_price, normal_price, actual_price.
However, I want to check if the sysdate is greater than date_from and less
than date_to then the value in the actual_price should be taken from the
season price for that record else the value should be taken from normal_price.
So, i would like to know how can do this? do i need to use visual basic?
I have no idea about visual basic. So, would like the complete way to do it.
Thanks
View 1 Replies
View Related
Jul 25, 2013
i want to make a string that contains all of the fields in a column.
I have a table called UserSelectedComponentT with a column called ComponentName.
I want a string that is essentially all the different component names seperated by a " + " .
View 4 Replies
View Related
Feb 6, 2014
I want to make a calculated column that adds 1 for every new record that isn't marked as being 'deleted' and will possibly subtract one if a record is marked as deleted. I'm not sure where to start other than calculated column.
View 5 Replies
View Related
Sep 11, 2014
I have a replica at work, 1 copy on the network, 1 local.. I need to add a column to the main table, getting "Operation is not supported for this type of object".... I have users that use the database but was given a change to the form/report which requires a column addition. What is the simplest way to get around this??? I'm trying not to get into major problems.
View 1 Replies
View Related
Jun 19, 2014
Can make a column show true or false in a table when two other columns in the table match each other? I think the statement would be like this:
If([Column1] = [Column2], True, False)
The only problem I am having is that I don't know if it can work in a table or does it just have to be in a query?
View 8 Replies
View Related
Sep 20, 2012
I have a table called Locations that lists Countries and Cities:
USA, Detroit
USA, Chicago
USA, New York
UK, London
UK, Liverpool
UK, Birmingham
France, Paris
France, Le Mans
I then have another table for inputing details on people I know. This table would have columns called Country and City. I've figured out how to make the Country column a "lookup column" so that I can only enter USA, UK or France. But how do I make the City column show only the appropriate list of cities relevant to the country that I've selected (e.g. Paris or Le Mans if France is the selected country).
View 5 Replies
View Related
Sep 22, 2013
How do I make a column invisible in my subform when the main form loads?
View 3 Replies
View Related
Mar 19, 2015
I've set the column widths properly on the subform, but the down arrow on the list box is still outside of the selection area. It may have something to do with lookups or concatenations, but I'm not finding that so in what I can think of to trace down.
I exaggerated the width of the list box to show where the down arrow actually shows itself.
See the form "frm_Class_Skills_Update" in the attached database. I need it to be visible when the list box is about 1.25" more narrow.
View 2 Replies
View Related
Sep 24, 2013
I am trying to run a simple update query to copy data from one column (Addrl1)to another column (Working_Addrl1) within the same file and I can't for the life of me figure it out. Then I need to repeat for addrl2 and addrl3 to working_addrl2 and working_addrl3.
View 7 Replies
View Related
Mar 24, 2014
I have created a cross tab to extract pipeline and sales for Q1 2014, Q2 2014, Q3 2014 & Q4 2014... the user can select the quater from a multivalued text box...
Now for the final output, have created another query which pull the above four quarter in each column from the cross tab...now the problem arises when i change the quarter to Q2 2014, Q3 2014, Q4 2014 & Q1 2014..it gives an error "Microsoft office Access database does not recognizes "Query name" as a valid field name or expression".
The error is because the second layer of query does not identifies Q1 2014.
How do i make access change the column automatically when the Q1 changes to Q2...
View 1 Replies
View Related
May 21, 2015
I am looking to add a column in a query that will give a Y or No to previous column data if it contains TEXT or NUMBER (It could read "TEXT" or "NUMBER" or even Y for text or N for number).
View 3 Replies
View Related
Apr 6, 2005
I have a form bound to a query. The query result has a field that I would like to reference, however I do not want the field on my form. Is there a way to reference a field in the query results that is not on the form?
View 3 Replies
View Related
Feb 1, 2007
I have a query that currently calculates a rating based on various values entered into the database. This rating corresponds to a Quality Index value based in another table. I tried to set up a query that links the rating value in the query to the Rating in the table, however, when I run this query, I don't get all the results I should. Is there some other way to make this work? I thought it would be simple to link the rating value that is calculated to the rating in the table and have it report the Quality Index value associated with that value. Please help! :confused:
View 5 Replies
View Related
Jul 19, 2007
Hi,
Trying to run an append query for a specific record on a subform but won't recognise the subform control.
The Master form is fmSickEdit do I have to reference the Master file in the SQL?
The SQL for the query is:
INSERT INTO tblDisLetter ( SickID, DateAdvisedDisciplinary )
SELECT tblSick.SickID, Date() AS [Date]
FROM tblSick
WHERE (((tblSick.SickID)=[Forms]![fmsubSickListEditVersion]![SickID]));
Thanks
View 2 Replies
View Related
Sep 2, 2007
Hey guys-
Been trying to figure this out, but am stuck. Obviously I'm fairly new to Access...
I have a table of properties and the price those properties sold for. Each property is in a specific area of town. I want to take each record and display the Address, Area of town, Price it sold for, and then the AVERAGE PRICE of all the other properties that sold in that same, specific area (not all the other areas of town, but the same area that the property sold for). The result should be displayed as below-
-Address- -Area- -Sold Price- -Avg Sold Price in Area-
And then it will list every property in the database, each with the same calculation all in one grid/table/dataset.
I figured out how to write a query to average all the sold prices in each area- but I don't know how to display that in conjunction with each record. Can someone throw a hint at me here?
Thanks
View 13 Replies
View Related
Jan 14, 2008
Hi all,
I'm trying to get a public function to work within the design view of a query. The function is defined as:
Public Function Percentile_(fldName As String, _
tblName As String, p As Double, _
Optional strWHERE As String = "") _
As Double... ( I can put the whole code if u need it)
Any thoughts about how I can make the Percentile function calculate values according to a GroupBy statement and not for whole data set?
View 14 Replies
View Related
Jul 23, 2013
I created a query that pulls information from 2 other queries and everything was going fine until I saved the query. I now get a circular reference error
SELECT [CashValue Link Query1].Facility,
[CashValue Link Query1].[Financial Class],
[CashValue Link Query1].Date,
[CashValue Link Query1].Date,
[CashValue Link Query1].[Total A/R],
[CashValue Link Query1].Current,
[code]....
View 1 Replies
View Related
Oct 10, 2013
I have a main form "KZ_SEARCH" and within this I have a subform which is loaded when a button is pressed and is populated with query results (based on text entered in a text box). The subform is called "KZ NOTICES Query subform". That all works fine and the query modifies based on the text entered every time the button is pressed. The next stage is that when the subform is loaded I want the user to be able to select a line from the subform and to jump to that record in another form (which also needs to be opened from that selection). The reference for the record to select in the newly opened form would be the first column of the selected line highlighted in the subform (control name "KZ NUMBER").
View 10 Replies
View Related
Dec 30, 2007
I have a query on a form that is providing all of the information I need for everything on my form.
The problem is I don't know how to refer to a field's value in the query in VBA without having a hidden text field on the form.
I know I can reference a combo box's query to include criteria such as [Forms]![cboSelectStudent] if the control is actually on the form, but how would I refer to a value in the form's query that doesn't have a control on the form.
I've been searching for everything I can think to call this but haven't been able to come up with anything.
Thanks.
View 6 Replies
View Related
Jul 20, 2005
I am new to this and i may be going about this the wrong way but what i am doing seems to do the job until now.
I am making a form that has a combo box, a few text boxes and a subform subreport on it.
The idea is that the first thing a user does is to select a name form the combo box. this name is then stored as a sring and used to set the forms record source and then the subform's (called window) source object. the string is slightly modified during the process to do this. That part works fine.
The problem arose when i included text boxes to show infomation from the selected Query thatisant show in the window (subform).
After the user selects a name and the name is used to set up the record source and the source object for the text boxes.it then displays in the text boxes the records extra data. however it only displays the first row extra data.And when other rows in the query table are selected the data in the text box stays set as the first row.
I know that this is because i haven't programed in an event that makes the text box data update when the user selects a new row.
i also realise that i would need to have some way of know what row of the quiery table the user is looking at to be able to update the text boxes.
my questions are
Is there a way to tell what row of a query table in the subform is selected ?
Is there an event similar to on selection of row or something like that that i could use to reload the text boxes?
and finaly
am i going about this the right way?
Any input on this would be greatly appreciated :)
View 5 Replies
View Related