Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate a form with alternating data from a separate table

Status
Not open for further replies.

Dophia

Technical User
Jul 26, 2004
263
CA
Hello Everyone: I have a form to enter data into a table. I want alternate new records to populate the form with an alternate name...either A or B. I assume the A and B will have to be in a new table. Example:

New Record
Populate A into field

Next Record
Populate B into field

Next Record
Populate A into field

Next Record
Populate B into field

I am stumped as to how to go about this. Any advise would be appreciated.

Sophia
 
[ul]
[li]Are all of the records new?[/li]
[li]Are these done in a batch or one at a time?[/li]
[li]Is there any field or fields that determine the order/sequence of the records?[/li]
[li]Do you have a table with A and B in a field?[/li]
[/ul]

Duane
Vevey, Switzerland
Hook'D on Access
MS Access MVP 2001-2016
 
Hi Duane:

Thanks for the reply.

•Are all of the records new? Yes
•Are these done in a batch or one at a time? One at a time.
Is there any field or fields that determine the order/sequence of the records? No. We just want to alternate the employee who looks after the record. The employees are A and B, in my example.
•Do you have a table with A and B in a field? I don't yet, but thought that this would be the best way, since the A can be changed to B later and vice vers.

What I am trying to do is to assign an employee, either A or B, to a case.

Sophia
 
Is there any field or fields that determine the order/sequence of the records? No."
Do you have a PK field in your table, like an AutoNumber? That could be used as "order/sequence" of the records.

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Hi Andy: That's a good idea, since there is a PK in the table. But how would I go about using it?

Sophia
 
Dophia,
What Andy and I are attempting to promote is a field or fields that can be used to determine the most recent record so the most recent employee can be determined. How do we know if A or B was the most recent if there isn't a stored value that provides this information?

Duane
Vevey, Switzerland
Hook'D on Access
MS Access MVP 2001-2016
 
You can check to whom the last record was assigned, and assign the new record to another employee. So if [tt]Max(PK)[/tt] from your table was assigned to A, new record will be assigned to B, and vice-versa (or versa-vice :) )

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top