I have data on a large number of samples that I want to track with Access.
To start I created a table (the Sample Table) with each sample as a separate
record, including some hyperlink fields that point to the location of the
data on the sample. So far so good. Now I need to do pairwise comparisons
of the sample data. My plan was to construct a second table (the Comparison
Table) listing pairs of sample numbers of the samples to be compared. I
thought that I would be able to lookup the required information in Sample
Table, copy it to Comparison Table, and then write a macro to do the
comparative analysis. But I haven't found a way to do this. I can find a
way to create a table that is a subset of Sample Table using a query, but I
haven't yet found a way to create a record in Comparison Table that contains
data from two records of Sample Table. It seems to me that this sort of
lookup function should be simple to implement in a relational database
program, but I can't find any examples of this type of sorting in the online
help or the tutorials. Any suggestions?
|
|
0
|
|
|
|
Reply
|
Utf
|
2/13/2008 10:30:03 PM |
|
On Wed, 13 Feb 2008 14:30:03 -0800, JFK <JFK@discussions.microsoft.com> wrote:
>I have data on a large number of samples that I want to track with Access.
>To start I created a table (the Sample Table) with each sample as a separate
>record, including some hyperlink fields that point to the location of the
>data on the sample. So far so good. Now I need to do pairwise comparisons
>of the sample data. My plan was to construct a second table (the Comparison
>Table) listing pairs of sample numbers of the samples to be compared. I
>thought that I would be able to lookup the required information in Sample
>Table, copy it to Comparison Table, and then write a macro to do the
>comparative analysis. But I haven't found a way to do this. I can find a
>way to create a table that is a subset of Sample Table using a query, but I
>haven't yet found a way to create a record in Comparison Table that contains
>data from two records of Sample Table. It seems to me that this sort of
>lookup function should be simple to implement in a relational database
>program, but I can't find any examples of this type of sorting in the online
>help or the tutorials. Any suggestions?
Well... I think you have it backwards. How on Earth could Access guess which
record you want to compare with which other record????
I would suggest two tables, and what's called a "many to many self join". The
comparison table should contain only two fields, both of the same datatype as
the Sample table's Primary Key. You could then use a Form based on the
comparison table, with two combo boxes to select the two samples to be
compared. Or, you could use a Form based on Samples, with a Subform based on
comparison, in which you could select (again using a combo box) which record
you want to compare.
You also do not need a macro to do the comparison. A Query would be the
appropriate tool.
Perhaps if you could indicate what kind of comparison you want to do, and
indicate how you choose which records are involved in the comparison, we might
be able to make some more useful suggestions.
--
John W. Vinson [MVP]
|
|
0
|
|
|
|
Reply
|
John
|
2/13/2008 11:36:09 PM
|
|
"John W. Vinson" wrote:
> On Wed, 13 Feb 2008 14:30:03 -0800, JFK <JFK@discussions.microsoft.com> wrote:
>
> >I have data on a large number of samples that I want to track with Access.
> >To start I created a table (the Sample Table) with each sample as a separate
> >record, including some hyperlink fields that point to the location of the
> >data on the sample. So far so good. Now I need to do pairwise comparisons
> >of the sample data. My plan was to construct a second table (the Comparison
> >Table) listing pairs of sample numbers of the samples to be compared. I
> >thought that I would be able to lookup the required information in Sample
> >Table, copy it to Comparison Table, and then write a macro to do the
> >comparative analysis. But I haven't found a way to do this. I can find a
> >way to create a table that is a subset of Sample Table using a query, but I
> >haven't yet found a way to create a record in Comparison Table that contains
> >data from two records of Sample Table. It seems to me that this sort of
> >lookup function should be simple to implement in a relational database
> >program, but I can't find any examples of this type of sorting in the online
> >help or the tutorials. Any suggestions?
>
> Well... I think you have it backwards. How on Earth could Access guess which
> record you want to compare with which other record????
>
> I would suggest two tables, and what's called a "many to many self join". The
> comparison table should contain only two fields, both of the same datatype as
> the Sample table's Primary Key. You could then use a Form based on the
> comparison table, with two combo boxes to select the two samples to be
> compared. Or, you could use a Form based on Samples, with a Subform based on
> comparison, in which you could select (again using a combo box) which record
> you want to compare.
>
> You also do not need a macro to do the comparison. A Query would be the
> appropriate tool.
>
> Perhaps if you could indicate what kind of comparison you want to do, and
> indicate how you choose which records are involved in the comparison, we might
> be able to make some more useful suggestions.
> --
> John W. Vinson [MVP]
>
Okay let me give you more details. The primary key in the Sample Table is
the sample number. The Comparison Table has only two fields, both of the
same type as the sample number. I tried making a many-to-many type
relationship in a variety of ways, but none of them will produce a table, or
at least I haven't learned how to do this yet. I don't want to do the
comparison in a form. I need a report describing which samples have been
compared in tabular format, and the analysis needs to be done in Excel as
described below.
As I mentioned, the Sample Table has hyperlinks to the location of the data.
The data for each sample consists of 10 spectral files, each of which
contains about 1000 data points. I need to compare 2 sets of 10 spectra
using multivariate statistics. I do this with existing VBA code in Excel.
My problem is that the data has become so extensive that I need a database to
keep track of it. My plan is to have a record for each sample in the Sample
Table, including hyperlinks to the location of the data for the sample. The
Comparison Table specifies which pairs of data need to be compared. (These
are specific pairs, it's not like a permutation problem. So I enter the
sample numbers into the Comparison Table manually.) Ideally this will look
like a table whose records include two sample numbers (samples to be
compared) and two hyperlinks to the location of the data along with some
other information. Then I plan to create an interface between Access and
Excel so that I can simply select a record from the Comparison Table and
initiate the statistical analysis with a dropdown menu or a command button.
At the moment I have to navigate through lots of folders to find the two data
sets to compare.
Maybe I can't generate a table within Access, and I need to be satisfied
with creating tabular reports in Excel, but if there is a way to do it in
Access, I'd like to know about it.
|
|
0
|
|
|
|
Reply
|
Utf
|
2/14/2008 2:34:01 AM
|
|
On Wed, 13 Feb 2008 18:34:01 -0800, JFK <JFK@discussions.microsoft.com> wrote:
>Okay let me give you more details. The primary key in the Sample Table is
>the sample number. The Comparison Table has only two fields, both of the
>same type as the sample number. I tried making a many-to-many type
>relationship in a variety of ways, but none of them will produce a table, or
>at least I haven't learned how to do this yet. I don't want to do the
>comparison in a form. I need a report describing which samples have been
>compared in tabular format, and the analysis needs to be done in Excel as
>described below.
Ok, that's a bit clearer.
>As I mentioned, the Sample Table has hyperlinks to the location of the data.
> The data for each sample consists of 10 spectral files, each of which
>contains about 1000 data points. I need to compare 2 sets of 10 spectra
>using multivariate statistics. I do this with existing VBA code in Excel.
>My problem is that the data has become so extensive that I need a database to
>keep track of it. My plan is to have a record for each sample in the Sample
>Table, including hyperlinks to the location of the data for the sample. The
>Comparison Table specifies which pairs of data need to be compared. (These
>are specific pairs, it's not like a permutation problem. So I enter the
>sample numbers into the Comparison Table manually.)
That's what I was wondering. If you enter the records manually then you...
just create a table with the two fields, and enter the record numbers
manually! You don't need to have Access create the table from the sample table
(it CAN'T, for that very reason - *you* know which pairs you want, Access
doesn't). You may be using the term "table" in a way that is different than
usual in Access.
>Ideally this will look
>like a table whose records include two sample numbers (samples to be
>compared) and two hyperlinks to the location of the data along with some
>other information.
Create a Query by adding the Sample table, the Comparison table (joining the
sample number in the Sample table to the first comparison table field), and
then adding the Sample table a second time, joining to the second comparison
table field. Select the Hyperlink fields from both instances of the sample
table, along with whatever other information you want to see. It is neither
necessary nor appropriate to copy the hyperlinks into the comparison table;
that's what queries are for.
>Then I plan to create an interface between Access and
>Excel so that I can simply select a record from the Comparison Table and
>initiate the statistical analysis with a dropdown menu or a command button.
>At the moment I have to navigate through lots of folders to find the two data
>sets to compare.
You can then base a Report on the query, showing both hyperlinks or the files
referenced by the hyperlinks; or, if you prefer, you can use File... Export to
export the Query to a workbook in Excel.
>Maybe I can't generate a table within Access, and I need to be satisfied
>with creating tabular reports in Excel, but if there is a way to do it in
>Access, I'd like to know about it.
You can do either, very easily.
--
John W. Vinson [MVP]
|
|
0
|
|
|
|
Reply
|
John
|
2/14/2008 3:51:43 AM
|
|
|
3 Replies
172 Views
(page loaded in 0.675 seconds)
Similiar Articles: Run make table query from Excel with Access closed - microsoft ...I have an make table query in Access that I want to be able to run from Excel. Ultimately I would like to be able to run the make table with Access... Create Temp table from query, with memo fields? - microsoft.public ...I am using Access XP and trying to export queries to Excel XP with memo fields that are getting truncated to 255. These fields have some functions in ... Create tables on multiple sheets from list - microsoft.public ...Hey everyone, I have been tinkering around with excel a bit, and I am curious is I could get the following done in a macro. I have a sheet wit... create a table of contents from documents inserted as object ...How do I create a table of contents from documents inserted as objects to the main one. The source of these documents is locked or protected. ... Creating one table - microsoft.public.access.gettingstarted ...I have downloaded a template from the Microsoft site and hope to be able to modify it to suit my needs. It already has a contacts table in it and I... running a "make table" query using VBA - microsoft ...Simple non-VBA way to delete table contents before append ... Simple non-VBA way to delete table contents before append ... Run a delete query. ... Unable to create table using Access 97 - microsoft.public.access ...Hi, When trying to create a table from a linked table on a SQL server, I get the following errors: "ODBC--call failed." and "[Microsoft][ODBC SQL Ser... Make Table v. Append to Table: Need Some Expert Design Inputs ...I am working on updates to a couple related databases (not linked by any tables) and have a question about virtues of Make Table vs Append queries. ... Adding Date to the table name in a Make Table Query - microsoft ...Before I delete the data in a particular table, I need to copy it into a table with the prefix of today's date. Is there a way to create a make tabl... Define date field in a make table query - microsoft.public.access ...Is there a way to define a field as a date, formatted as mm/yyyy from the make table query? By default, the field will be text, but I will be loading... SQL: CREATE a table from another table - TechOnTheNet.comYou can also create a table from an existing table by copying the existing table's columns. How to Create a Make-Table Action Query in Microsoft Access | eHow.comYou can use a Make-Table action query in Microsoft Access to create a new table from all or part of the data in one or many tables. For example, you may want to use ... Create a make table query - Access - Office.comThe information in this article explains how to create and run a make table query. You use a make table query when you need to copy the data in a table or archive data. How to Create a Table From Another Table in MySQL | eHow.comCreate a table from another MySQL table using a combination of the "create table" statement and the "select" statement. The "create table" statement creates the table ... CREATE TABLE - Microsoft Corporation: Software, Smartphones ...Topic last updated -- July 2003. Creates a new table. Syntax. CREATE TABLE [ database_name.[ owner ] . | owner. ] table_name ( { < column_definition > 7/29/2012 4:18:10 AM
|