How do I copy every third or fourth record to a status table?
am 07.01.2008 09:27:46 von chrisdavis
I have a submission form with data in it that is submitted into
"tblSubmitter" with basic information.
I need to take every third record and mark a "status" to it. For
Example: (these are unique ID's in the table, SUBMITERID)
1
2
3
4
5
6
7
8
9
I need to assign 2, 3, 4 to record 1 as "Gifters" and record 5 as a
"Receiver" to record 1.
i need to assign 6, 7, 8, to record 2 as "Gifters" and record 9 as a
"Receiver" to record 2.
and so on in the DB. These are being submitted on a first in first
out basis. The DB may have to "wait" until it gets all 3 Receivers
and 1 Gifter before it continues with it's calculations. This is
based on an insert record behavior on the form.
Here is a link to the participation form:
http://thebiblicalseven.com/application_form.php
THEN I need to send an email letter with variables from the form
(i.e., email address, contact information) to each Receiver and their
3 Gifters called a Friends List.
I am a beginner with PHP so any coding help would be awesome..I can
create these tables to update with the SUBMITER ID as the PK but
haven't created any tables as of yet until I figure out what direction
to go. I would like to keep it relational if possible.
I also need to make sure the same givers and receivers are not
assigned if they enter another email address. I know this is
confusing but I would be happy to explain if someone out there had a
clue how to code this!
I was going to use PHP and MySQL but I think I will just link to the
MySQL tables and try this with an update query or function. i do not
know VB very well so any coding help would be awesome!
Thanks!
You guys on here are great. I have learned a lot so far..
Re: How do I copy every third or fourth record to a status table?
am 07.01.2008 10:03:18 von Allen Browne
Chis, I think you may need to learn how to OpenRecordset, and walk the
records. Use Edit and then Update. You can use your own counter, and use Mod
3 (or Mod 4) to calculate when to change.
Here's a basic introduction to walking a recordset:
http://allenbrowne.com/func-DAO.html#DAORecordsetExample
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"chrisdavis" wrote in message
news:36c15cf0-2d71-41ad-9cc8-c804b414481d@e23g2000prf.google groups.com...
>I have a submission form with data in it that is submitted into
> "tblSubmitter" with basic information.
>
> I need to take every third record and mark a "status" to it. For
> Example: (these are unique ID's in the table, SUBMITERID)
>
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
>
> I need to assign 2, 3, 4 to record 1 as "Gifters" and record 5 as a
> "Receiver" to record 1.
>
> i need to assign 6, 7, 8, to record 2 as "Gifters" and record 9 as a
> "Receiver" to record 2.
>
> and so on in the DB. These are being submitted on a first in first
> out basis. The DB may have to "wait" until it gets all 3 Receivers
> and 1 Gifter before it continues with it's calculations. This is
> based on an insert record behavior on the form.
>
> Here is a link to the participation form:
>
> http://thebiblicalseven.com/application_form.php
>
> THEN I need to send an email letter with variables from the form
> (i.e., email address, contact information) to each Receiver and their
> 3 Gifters called a Friends List.
>
> I am a beginner with PHP so any coding help would be awesome..I can
> create these tables to update with the SUBMITER ID as the PK but
> haven't created any tables as of yet until I figure out what direction
> to go. I would like to keep it relational if possible.
>
> I also need to make sure the same givers and receivers are not
> assigned if they enter another email address. I know this is
> confusing but I would be happy to explain if someone out there had a
> clue how to code this!
>
> I was going to use PHP and MySQL but I think I will just link to the
> MySQL tables and try this with an update query or function. i do not
> know VB very well so any coding help would be awesome!
>
>
> Thanks!
>
> You guys on here are great. I have learned a lot so far..