Query Datasheet Help

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

I have created a select query that is activated by a
button on the switchboard using DoCmd.OpenQuery ...

The resulting datasheet has values in it that I want to
use to perform calculations. Using VB, I want to take
these values line by line, perform logic based on the
data, and then export the values to a separate table with
different field names.

I.E.

TEST-Query returns the following:

ID_NUMBER | NAME | STATUS
123456 | Smith | A
234567 | Jones | B

Then, using VB Code, I pull the first record (ID_NUMBER
123456/Smith/A). The logic returns the value "True" which
I then want to send to a table (TEST-Table) and store in
(TEST-Field).

My questions are,
Can I do this?
If Yes, how?

Thanks if you can help.
 
Rich said:
I have created a select query that is activated by a
button on the switchboard using DoCmd.OpenQuery ...

The resulting datasheet has values in it that I want to
use to perform calculations. Using VB, I want to take
these values line by line, perform logic based on the
data, and then export the values to a separate table with
different field names.

I.E.

TEST-Query returns the following:

ID_NUMBER | NAME | STATUS
123456 | Smith | A
234567 | Jones | B

Then, using VB Code, I pull the first record (ID_NUMBER
123456/Smith/A). The logic returns the value "True" which
I then want to send to a table (TEST-Table) and store in
(TEST-Field).

My questions are,
Can I do this?
If Yes, how?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Perhaps it would be easier to create an INSERT query based on the query
that you open from the Switchboard. E.g.:

INSERT INTO TEST_Table (Test_Field)
SELECT ID_Number
FROM TEST_Query
WHERE <logic evaluation of each record>

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQIWrIYechKqOuFEgEQLx6gCfc/iQzXEssq3l/cfWaCIkBAgy8J0AoND4
RopMEzA2aQi1oh7omKGWeJM1
=Pu2a
-----END PGP SIGNATURE-----
 
Back
Top