Using skip to move to the next record 
Author Message
 Using skip to move to the next record

I must be missing something. I have a form with parent table(employee)
populating some text boxes and a one too many child(register) filling a
grid. Normally these two are related by ID#. I have another text box which
allows the user to search on last name in keypress event. I set the order of
the parent cursor to last name and do a seek and the parent table moves to
the first last name match. Some last names are duplicated so I have to give
the user the ability to move to next Smith, John. I gave them a button with
Skip in 'employee'   and a refresh in the click event. The employee table
does not move but the child table(register) does. I'm confused -Do I have to
do something in the dataenvironment before attempting this. Any help would
be greatly appreciated.
Thanks
Dan


Mon, 05 Sep 2005 11:02:29 GMT  
 Using skip to move to the next record
Hi Dan,

I can see you complaining about the lack of record pointer movement in the
child table when the parent record changes, but I'm mystified that the child
record changes but not the parent.

Have you run your form in the De{*filter*}? Are the tables related the way you
want them (check the Data Session window). Do you perhaps have the wrong
table selected? Be sure you're in the right data session if your form is
using a private data session.

--
Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP

http://www.*-*-*.com/ ; http://www.*-*-*.com/


Quote:
> I must be missing something. I have a form with parent table(employee)
> populating some text boxes and a one too many child(register) filling a
> grid. Normally these two are related by ID#. I have another text box which
> allows the user to search on last name in keypress event. I set the order
> of
> the parent cursor to last name and do a seek and the parent table moves to
> the first last name match. Some last names are duplicated so I have to
> give
> the user the ability to move to next Smith, John. I gave them a button
> with
> Skip in 'employee'   and a refresh in the click event. The employee table
> does not move but the child table(register) does. I'm confused -Do I have
> to
> do something in the dataenvironment before attempting this. Any help would
> be greatly appreciated.
> Thanks
> Dan



Mon, 05 Sep 2005 12:19:04 GMT  
 Using skip to move to the next record
On Wed, 19 Mar 2003 23:19:04 -0500, "Cindy Winegarden"

Quote:

>Hi Dan,

>I can see you complaining about the lack of record pointer movement in the
>child table when the parent record changes, but I'm mystified that the child
>record changes but not the parent.

Me too - except that if your command had moved the pointer in the
child table. Are you sure this isn't what happened ?

Quote:

>Have you run your form in the De{*filter*}? Are the tables related the way you
>want them (check the Data Session window). Do you perhaps have the wrong
>table selected? Be sure you're in the right data session if your form is
>using a private data session.

'Skip in' should avoid the problem of having the wrong table selected.

Have you got the alias correct ? Have you perhaps opened the table
programmatically and accidentally applied the wrong alias ? spealing
from experience <vbg>

HTH,
        Mike.



Mon, 05 Sep 2005 16:39:33 GMT  
 Using skip to move to the next record
It seems as if Dan had a SET SKIP relation in effect (that's the default
behaviour for SET SKIP). If that's the case, just remove it. Most surely you
don't need it.

Regards,

Jorge Zaldvar



Quote:
> On Wed, 19 Mar 2003 23:19:04 -0500, "Cindy Winegarden"

> >Hi Dan,

> >I can see you complaining about the lack of record pointer movement in
the
> >child table when the parent record changes, but I'm mystified that the
child
> >record changes but not the parent.
> Me too - except that if your command had moved the pointer in the
> child table. Are you sure this isn't what happened ?

> >Have you run your form in the De{*filter*}? Are the tables related the way
you
> >want them (check the Data Session window). Do you perhaps have the wrong
> >table selected? Be sure you're in the right data session if your form is
> >using a private data session.
> 'Skip in' should avoid the problem of having the wrong table selected.

> Have you got the alias correct ? Have you perhaps opened the table
> programmatically and accidentally applied the wrong alias ? spealing
> from experience <vbg>

> HTH,
> Mike.



Tue, 06 Sep 2005 01:33:54 GMT  
 Using skip to move to the next record
Yes - that is what seemed to be my problem. I had not broken the relation
with    set relation off in 'employee'. My guess is that since it was a One
to many it wouldn't allow the parent to move until it had gone through all
the child records. One day I'll know what others did 20 ..wait maybe 30
years ago.
Thanks for your responses
Dan

Quote:
> It seems as if Dan had a SET SKIP relation in effect (that's the default
> behaviour for SET SKIP). If that's the case, just remove it. Most surely
you
> don't need it.

> Regards,

> Jorge Zaldvar



> > On Wed, 19 Mar 2003 23:19:04 -0500, "Cindy Winegarden"

> > >Hi Dan,

> > >I can see you complaining about the lack of record pointer movement in
> the
> > >child table when the parent record changes, but I'm mystified that the
> child
> > >record changes but not the parent.
> > Me too - except that if your command had moved the pointer in the
> > child table. Are you sure this isn't what happened ?

> > >Have you run your form in the De{*filter*}? Are the tables related the way
> you
> > >want them (check the Data Session window). Do you perhaps have the
wrong
> > >table selected? Be sure you're in the right data session if your form
is
> > >using a private data session.
> > 'Skip in' should avoid the problem of having the wrong table selected.

> > Have you got the alias correct ? Have you perhaps opened the table
> > programmatically and accidentally applied the wrong alias ? spealing
> > from experience <vbg>

> > HTH,
> > Mike.



Tue, 06 Sep 2005 09:54:12 GMT  
 Using skip to move to the next record
Dan,

Look at using a parameterized view for your child table. There's a simple
example over on my website if you've never played with them before.

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro


Quote:
> Yes - that is what seemed to be my problem. I had not broken the relation
> with    set relation off in 'employee'. My guess is that since it was a
One
> to many it wouldn't allow the parent to move until it had gone through all
> the child records.



Tue, 06 Sep 2005 10:39:24 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Using Enter Key to move down to next cell in Browse

2. Next button (SKIP 1) in screent set with a browse

3. Rep/label doesn't skip to next

4. SetFocus skips to next Command Button

5. textbox control on forms skipping to next textbox

6. FPD26 waits for printing to be over to move to next procedure

7. Move Next Row on Grid

8. Move to next row in grid (VFP3.0)

9. Moving to next field after a barcode scan

10. Move to next row in grid? (VFP3.0)

11. move text to next line in MessageBox()

12. Updating A Record Within A Grid (And Trying Not To Move Off Record Till Done)

 

 
Powered by phpBB® Forum Software