Go to a Specific Record on a Subform

  • Thread starter Thread starter clk
  • Start date Start date
C

clk

Hi. I have a form with a continuous subform. I would like to open
this form and have my cursor in a specific cell on the subform.

MAIN FORM
Test Number: 123

CONTINUOUS SUBFORM
Test Num Tester Test Date
123 AB 01/01/11
124 CB 01/03/11
125 DC NULL

I would like my form to open and the focus to be in the Test Date
field where the null record is located (it is really just blank).

Any help would be appreciated.
 
Hi. I have a form with a continuous subform. I would like to open
this form and have my cursor in a specific cell on the subform.

MAIN FORM
Test Number: 123

CONTINUOUS SUBFORM
Test Num Tester Test Date
123 AB 01/01/11
124 CB 01/03/11
125 DC NULL

I would like my form to open and the focus to be in the Test Date
field where the null record is located (it is really just blank).

Any help would be appreciated.

What's the Recordsource for the child form? What's the Master/Child link
field? Is the subform based on a sorted query (sorted by test number, by test
date, something else, or no sort specified)? Is it important to SEE the
records with non-null test dates or would it be appropriate to instead base
the subform on a query selecting only the incomplete records?
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
What's the Recordsource for the child form? What's the Master/Child link
field? Is the subform based on a sorted query (sorted by test number, by test
date, something else, or no sort specified)? Is it important to SEE the
records with non-null test dates or would it be appropriate to instead base
the subform on a query selecting only the incomplete records?
--

             John W. Vinson [MVP]
 Microsoft's replacements for these newsgroups:
 http://social.msdn.microsoft.com/Forums/en-US/accessdev/
 http://social.answers.microsoft.com/Forums/en-US/addbuz/
 and see alsohttp://www.utteraccess.com- Hide quoted text -

- Show quoted text -

The record source is a table (main table tblTest with TestNo
(autonum), TestName (text).
Subform is a table linked to main table TestID (auto), TestNo (num),
Test #, Tester, Test Date.

I am already filtering the form to only show one test and all the test
dates that go to that test number. Now when it opens I just need it
to jump down to the first incomplete record (missing test date). But
all data needs to show on form whether it is complete or incomplete.

Hope this makes sense and answers your questions.

I have tried an on Open event procedure to set the focus to the Date
of Test field but I can't get it to move to first null record.
 
If your example is an accurate representation, then it is clear that the
Link Master Fields and Link Child Fields of the Subform control are not
TestNo, as might be inferred, and as would appear to be the correct link
fields. I believe John Vinson asked you what fields you used for this
purpose and you did not reply -- it's a Really Good Idea to carefully read
the questions people who are trying to help you ask, and respond to each.
It's difficult at best to debug remotely; without the necessary information
it is impossible.
--
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access

What's the Recordsource for the child form? What's the Master/Child link
field? Is the subform based on a sorted query (sorted by test number, by
test
date, something else, or no sort specified)? Is it important to SEE the
records with non-null test dates or would it be appropriate to instead
base
the subform on a query selecting only the incomplete records?
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see alsohttp://www.utteraccess.com- Hide quoted text -

- Show quoted text -

The record source is a table (main table tblTest with TestNo
(autonum), TestName (text).
Subform is a table linked to main table TestID (auto), TestNo (num),
Test #, Tester, Test Date.

I am already filtering the form to only show one test and all the test
dates that go to that test number. Now when it opens I just need it
to jump down to the first incomplete record (missing test date). But
all data needs to show on form whether it is complete or incomplete.

Hope this makes sense and answers your questions.

I have tried an on Open event procedure to set the focus to the Date
of Test field but I can't get it to move to first null record.
 
Back
Top