How can i achieve this ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
I want to use the "loop untill command to do the following :

I have two forms : the main form is called "dblswap" the subform is called
"accepted swaps", on opening the form I'd like that the subform "accepted
swaps" loops the command 'DoCmd.Find next" till the following condition is
achieved :
[Forms]![dblswap]![accepted swaps]![Form].[Agent1] =[Agent1] Or
[Forms]![dblswap]![accepted swaps]![Form].[Agent1] =[Agent2] Or
[Forms]![dblswap]![accepted swaps]![Form].[Agent2] =[Agent1] Or
[Forms]![dblswap]![accepted swaps]![Form].[Agent2] =[Agent2]

How can I do that ? Is there another way to do this without using "loop
until"???
Regards
 
Hi all,
I want to use the "loop untill command to do the following :

I have two forms : the main form is called "dblswap" the subform is called
"accepted swaps", on opening the form I'd like that the subform "accepted
swaps" loops the command 'DoCmd.Find next" till the following condition is
achieved :
[Forms]![dblswap]![accepted swaps]![Form].[Agent1] =[Agent1] Or
[Forms]![dblswap]![accepted swaps]![Form].[Agent1] =[Agent2] Or
[Forms]![dblswap]![accepted swaps]![Form].[Agent2] =[Agent1] Or
[Forms]![dblswap]![accepted swaps]![Form].[Agent2] =[Agent2]

How can I do that ? Is there another way to do this without using "loop
until"???
Regards

You've posted this a couple of times, and I'm still totally baffled by
what you're trying to do. What is "looping"? What events are occuring
during the loop? What is the [Agent1] on the right of the equals - a
control on the main form, or what? How are the values of Agent1 and
Agent2 supposed to be changing?

Step back a bit, and explain what - from the user's view - you're
trying to accomplish with this form!

John W. Vinson[MVP]
 
Well,
I'd like that the subform(single form) moves form a record to the other
one,till the condition is acheived,exactly as if i had clicked on 'next'
the values of Agent1 and Agent2 should be changing while i'm moving from
record to the other.

John Vinson said:
Hi all,
I want to use the "loop untill command to do the following :

I have two forms : the main form is called "dblswap" the subform is called
"accepted swaps", on opening the form I'd like that the subform "accepted
swaps" loops the command 'DoCmd.Find next" till the following condition is
achieved :
[Forms]![dblswap]![accepted swaps]![Form].[Agent1] =[Agent1] Or
[Forms]![dblswap]![accepted swaps]![Form].[Agent1] =[Agent2] Or
[Forms]![dblswap]![accepted swaps]![Form].[Agent2] =[Agent1] Or
[Forms]![dblswap]![accepted swaps]![Form].[Agent2] =[Agent2]

How can I do that ? Is there another way to do this without using "loop
until"???
Regards

You've posted this a couple of times, and I'm still totally baffled by
what you're trying to do. What is "looping"? What events are occuring
during the loop? What is the [Agent1] on the right of the equals - a
control on the main form, or what? How are the values of Agent1 and
Agent2 supposed to be changing?

Step back a bit, and explain what - from the user's view - you're
trying to accomplish with this form!

John W. Vinson[MVP]
 
Well,
I'd like that the subform(single form) moves form a record to the other
one,till the condition is acheived,exactly as if i had clicked on 'next'
the values of Agent1 and Agent2 should be changing while i'm moving from
record to the other.

I'm sorry. I still don't understand. You did not answer my questions -
where are Agent1 and Agent2 coming from? What's "changing" them?
You're comparing two values of each - where are the values with which
you're comparing coming from?

Might it make more sense to base the Subform on a paramter query which
just displays the desired record in the first place, rather than
"looping"???


John W. Vinson[MVP]
 

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

Back
Top