Lookup Value On Multiple Items In A Comma Separated Field?
Nov 16, 2013
I have a table like this below:
ProductID ProductName
1 AAA
2 BBB
3 CCC
I have a field in another table, like this:
RelatedProducts
AAA,CCC
AAA
AAA,BBB,CCC
I need a field in one of my queries that will return the related products field data like this:
RelatedProducts
1,3
1
1,2,3
View Replies
ADVERTISEMENT
Apr 30, 2015
I have a list with 50 items in it, I would like to select some of these items by pasting in a coma separated list, is this possible?
View 12 Replies
View Related
Feb 18, 2014
I would like update a table column values separated by ; For example
1. ColumA has no data, I want to do an update and place a comma at the end
2. If ColumA has already value do not delete add new valued at the end where ; if found.
My start attempt as follow:
Code:
qry_test= "UPDATE Table1 SET ColumA =" & "Enter Entered ;" & & _
" WHERE ID=" & 1
Set RS = cnnDB.Execute(qry_test)
What do I need to do to add more stuff where ; is found without delete existing value if values exist.
View 2 Replies
View Related
Jan 30, 2007
Hi
I'm having a senior moment...
I have a reference field - examples below and need to split into the component parts
example Ref_IDs:
C21/0051,Sheet 18, Sheet 19, E 3, 12/01/07
C21/0052.04, Sheet21 ,E 2
C21/0054, Sheet 23, B 2, 05/01/07
First - ref no, Second - Sheet (note some have more than one), Third - Grid and lastly some have dates, but not all
View 6 Replies
View Related
Jun 18, 2013
I'm using Access 2007.
So far I have a Multi Select enabled list on which the user selects the serial numbers they want. They then click the "Report" button which will trigger a query based on the selected serial numbers to create a report on those serial numbers.
I have the code for the multi-select list working already. It creates a string of comma separated values that are the serial numbers which are selected in the list. Somehow I need to pass this string to my query so it can use it as a filter.
Here is some of my code:
Code:
Option Compare Database
Option Explicit
Private Sub Form_Current()
Dim oItem As Variant
Dim bFound As Boolean
[Code] ....
Here's my current query in SQL:
Then finally how to I get the query to execute and create a report based on all of this?
View 11 Replies
View Related
Apr 28, 2013
I've current got two tables, one with Products and the other with Suppliers. The products table has a column in which I may indicate Supplier IDs that carry the product. I'd like to make a report that groups the Products by the Supplier that carries them and I'm having some trouble. The way I see this working is to relate the Supplier ID found in the Product table with the auto generated Supplier ID in the supplier table.
My trouble is this, when the field is set to text I'm able to enter values separated by commas no problem but I can't report on them because I'd be relating a number to a string. How may I overcome this?
View 7 Replies
View Related
Jul 31, 2014
I have an access table for SampleTests. Each sample may have multiple tests carried out on it. Each test is one record in the access table and a sample may have multiple records therefore depending on how many tests are to be carried out on this sample. I need to create a query that would have sampleID as one of the fields which it gets from the SampleTests table and then I need the second column to have all the tests associated with that sample ID in the format test1,test2, etc. but I cannot see how I can get access to put these records together separated by a comma.
View 5 Replies
View Related
Aug 26, 2013
I have a single 'text' box on a form that captures test scores. The person inputting the test scores puts in all of the scores separated by commas (77, 85, 100, 75.5).. Up to 6 test scores can be placed in this single text box. The field is formatted for text. What I propose to do is take the numbers in the text box and average them out and then display the test scores average in a number field named 'avescores' next to this field in the form. Once the inputer puts the series of scores into the text box, they would hit an 'update' button next to this box to 'update' the 'avescores' box. Right now they use a number pad and add up the numbers manually then place the average into the avescores box....
View 11 Replies
View Related
Feb 11, 2015
I have a field email in the table 2015. I woud create a query that sort my mails separated by a comma. E.G.
123@456.com
456@789.fr
...
Sorted =
123@456.com,456@789.fr, ...
View 2 Replies
View Related
Jan 16, 2014
I use Access 2003. I am trying to populate a list box with the names of files found in specific folder in my computer. The problem is that if the file name has a comma (,) in it, so the name is being separated in two parts - first what is before a comma and second what is after. I need them exactly as they appear in directory in order to open the files from this list box.
View 2 Replies
View Related
Mar 22, 2013
If I have a text box (Text1) on my form with comma separated values entered i.e. 100,120,250,300 what would be the easiest way to enter these into a table column with a button click event. I would like to enter these values into my table tb_test under column Values.
View 7 Replies
View Related
Sep 30, 2011
I created a multivalue list in my table. It contains a list of names and a checkbox. I designed the form based on this and am able to check off multiple names. When I go back to look at the table, it stores in each name separated by a comma. So far so good.
When I create a report to display the data, it displays it as 1,2,3..etc., instead of the names separated by a comma.
What do I need to do to display the names ?
View 5 Replies
View Related
Nov 18, 2014
I am trying to create a list of values in a field separated by commas. I have done this in a query as follows:
[Field1]&", "&[Field2]&", "&[Field3] and so on.
However, when Field2 is null, the result is two commas between Field1 and Field2, but I only need one. What function can I use to eliminate the extra commas when fields used in the concatenation are null?
View 10 Replies
View Related
Oct 24, 2007
Hi.
Stupid question, but I have Access 97 database with ssn in each record.
I need to create a comma-delimted text file with these ssns.
When I use the export text file with a query that lists each record's ssn, it does not produce comma-delimited file.
How?
Russ
View 5 Replies
View Related
May 4, 2005
I am trying to enter multiple parts into the same field and using commas to separate them. Is there a way to create multiple records with the same information, but change the part numbers in them according to comma's?
Would look like this.
Primary Key Location Part number
789 bin89756 89756,87564,78965,12565,45896
I want it to do this in the end.
Primary
Key Location Part number
789 bin89756 89756
790 bin89756 87564
791 bin89756 78965
792 bin89756 12565
793 bin89756 45896
View 2 Replies
View Related
Apr 4, 2006
Hi,
Is there anyway to have a single field in a table which is populated via the use of a lookup onto another table, but allowing multiple value selection out of the lookup table and populating those into the field...
For example
Table 1 is customer details
Table 1 field 3 = areas of interest
Table 1 field 3 is populated via a lookup into Table 2 interests
Table 2 has 4 records
Sport
Household
Motoring
Family
I want to be able to select 1 or more of the Table 2 values and populate them into Table 1 Field 3....
Help my head hurts....
View 3 Replies
View Related
May 7, 2014
I'm a new to Access, SQL. I need the following output:
Input:
PHP Code:
PO Vendor State
a, b 1,2 IL
c, d, e 3 TX
f 5 CA
Output:
PHP Code:
PO Vendor State
a 1,2 IL
b 1,2 IL
c 3 TX
d 3 TX
e 3 TX
f 5 CA
I found the following SQL code from another forum, which splits entries in a cell separated by commas into 2 rows, output being:
PHP Code:
PO Vendor State
a 1,2 IL
b 1,2 IL
c 3 TX
d,e 3 TX
f 5 CA
SELECT * INTO ImportedData
FROM (
SELECT PO, Vendor, State
FROM SourceData
[Code] ....
How to run a loop so that if a cell has n entries separated by commas, I want them to be split into 'n' number of rows.
View 3 Replies
View Related
Apr 8, 2013
I wish to change the backcolor of a field on a current record being dispalyed in a 'multiple items' form. However when using me.A.backcolor = makes refrence to all fields called A on the 'multiple items' form and therefore all fields change colour not just the current record.
View 2 Replies
View Related
Jan 2, 2014
We have a form, which has a field linked to a "Recipients" table through a lookup. The field is bound to the recipient's name, but the lookup displays additional columns for user to identify the correct recipient in the case of duplicate names.
The "Payment" table's Recipient field only displays the recipient's name. So where duplicates occur, it's impossible to know which recipient is the correct one associated to a payment.
I would like to add an additional field to the "Payment" table called "RecipientIDNo". I need a way to auto-populate this field, based on the already existing Recipient field. Is this possible?
Why I just don't modify the recipient field on our payment form to be bound to the user ID number, there are two reasons.
(1) The field is linked to too many other reports and queries at this point. I believe it could cause an enormous amount of work to modify.
(2) the form likes to display whatever it is bound to. There may be a workaround for this, but I'm not aware of it and don't want the form displaying a number instead of a recipient name.
View 7 Replies
View Related
Jul 18, 2007
I have a Combo Box based on a table list on a Form. I want to choose several items from the list to feed a Lookup Query. Can this be done? :rolleyes:
View 1 Replies
View Related
Dec 6, 2006
I have made a few lookup tables in the database I'm working on using the lookup wizard and entering the text I want in them. I made a form and they come over fine on them.
My question is that I thought that there was a way when you entered something other than was in that field it would automatically add it to that list and you could just select it next time instead of typing it in again. Is that possible or am I thinking of something else.
View 2 Replies
View Related
Mar 8, 2015
how to split this , I am new Access DB, I worked in Sql Server but access new to me
I have the below data
Appid Names
100 John,Bob,Kondya, Lima
200 Shor,James,Kim
300 Cinem
I want to convert to
Appid Names Name1 Name2 Name3 Name4
100 John Bob Kondya Lima NULL
200 Shor James Kim NULL NULL
300 Cinem NULL NULL NULL Null
View 2 Replies
View Related
Nov 23, 2012
how to do a particular thing in Access 2010 (I don't even know if it is possible).
I have a table named PRODUCTS:
ID_PRODUCT (primary key, autonumber long integer)
ALLOWED_OPTIONS (multi value text lookup field: "Option 1";"Option 2";...;"Option 9")
So I can store, for each different product, none, one, or more options to let the customers choose from.
I have a table named ORDERS:
ID_ORDER (primary key, autonumber long integer)
FK_CUSTOMER (foreign key, linked to the primary key of a CUSTOMERS table; represents the customer that places the order.)
FK_PRODUCT (foreign key, linked to PRODUCTS.ID_PRODUCT; represents the product that the customer has choosen)
CHOOSEN_OPTION (lookup text field; the customer must choose ONE option among those allowed for the product he has ordered)
The problem is that I would like the CHOOSEN_OPTION field to show as a combobox, listing the values stored into PRODUCTS.ALLOWED_OPTIONS, so that when a customer buys a product, he can choose only among the options allowed by that particular product.How can I manage a multi value field to populate a combobox, in which every item stays on its line? If I use, as a query to populate the combobox:
select [PRODUCTS].[ALLOWED_OPTIONS]
from PRODUCTS
where [PRODUCTS].[ID_PRODUCT]=[FK_PRODUCT]
I obtain an empty combobox.If I refer to the last field as [ORDERS].[FK_PRODUCT], Access asks me to type a value for "[ORDERS].[FK_PRODUCT]", treating it as an unknown parameter.I think that the problem is that when the combobox expands, the record is not committed yet, so FK_PRODUCT is unknown (NULL?). But this happens even if I commit the record typing something in FK_PRODUCT and then I re-enter the record and I expand the CHOOSEN_OPTION combobox, that is still empy although FK_PRODUCT exists, now.Is there a particular syntax to refer to a field in a record not committed yet (something like "THIS." or "ME.")?
View 5 Replies
View Related
Oct 21, 2013
I have a field in a table that I'd like to extra the texts from. The are stored in below format (separated by colons). They don't always the same amount of characters and not all of them have the same amount of texts.
Some may only have Text1:Text2::, while some may have Text1:::Text4.
Text1:Text2:Text3:Text4
View 8 Replies
View Related
Aug 11, 2012
I have a few bit fields that, when checked, specific text need to be displayed in a field separated by commas.
Example:
Child 1 = checked
Child 2 = not checked
Child 3 = checked
Child 4 = not checked
Output:
Child 1, Child 3
I did find this sample expression that I am using in another area and it is working perfect and I understand it works based off of string length.
Mid(IIf(Len(Expr1), ", " & Expr1, "") & IIf(Len(Expr2), ", " & Expr2, "") & IIf(Len(Expr3), ", " & Expr3, ""),Len(", ") + 1)
What is the best way to accomplish this?
View 4 Replies
View Related
Dec 6, 2006
I have a csv file which seperates each field with a comma. Now i have some fields that contain comma's within them but they are enclose in quotation marks. How would i import it so that it doesnt seperate these fields?
View 6 Replies
View Related