Form and QUERIES data

C

Cipher

I need to test the values within a TABLE and a QUERY of the TABLE. I would
like to test the value of a COLUMN for each ROW of a TABLE until the EOF has
been reached. It would be nice if the records and columns were part of a 2D
Array. This way I could check any data field within the TABLE or QUERY and do
math such as: IF COLUMN 6/ROW 20 = "January", then COLUMN 1=MIN_MONTH.

How can I read the ROW/COLUMN data within each intersecting cell. I need the
VBA syntax for this operation...thanks everybody.
 
A

Allen Browne

Use a recordset to programmatically loop through records.

Here's an example:
http://allenbrowne.com/func-DAO.html#DAORecordsetExample

You can programmatically loop through the Fields of the recordset (from 0 to
Fields.Count -1) to examine each one in turn.

But before you go to the trouble of doing this, you might be better advised
to spend your time learning about normalization. Databases are radically
different beasts that spreadsheets. If you are looping through the columns,
you may have similar data in many columns, which is not the right way to
design a database. You might start by asking Access to analyze your table:
Tools | Analyze | Table

Here's a basic example of normalized tables:
http://allenbrowne.com/casu-06.html
http://allenbrowne.com/casu-23.html
And here's a bunch more links:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html#DatabaseDesign101
 
C

Cipher via AccessMonster.com

Thank you...I will look into these links and get back to you with my findings.
Thank you again. If I have a Time Issue with this, can I get someone to help
me with the two forms?

Allen said:
Use a recordset to programmatically loop through records.

Here's an example:
http://allenbrowne.com/func-DAO.html#DAORecordsetExample

You can programmatically loop through the Fields of the recordset (from 0 to
Fields.Count -1) to examine each one in turn.

But before you go to the trouble of doing this, you might be better advised
to spend your time learning about normalization. Databases are radically
different beasts that spreadsheets. If you are looping through the columns,
you may have similar data in many columns, which is not the right way to
design a database. You might start by asking Access to analyze your table:
Tools | Analyze | Table

Here's a basic example of normalized tables:
http://allenbrowne.com/casu-06.html
http://allenbrowne.com/casu-23.html
And here's a bunch more links:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html#DatabaseDesign101
I need to test the values within a TABLE and a QUERY of the TABLE. I would
like to test the value of a COLUMN for each ROW of a TABLE until the EOF
[quoted text clipped - 8 lines]
the
VBA syntax for this operation...thanks everybody.
 
A

Allen Browne

Cipher via AccessMonster.com said:
Thank you...I will look into these links and get back to you with my
findings.
Thank you again. If I have a Time Issue with this, can I get someone to
help
me with the two forms?

If you get stuck at a particular point, feel free to post a question.

Please don't email us directly: we all have busy time schedules as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top