Staying on the current record when moving between (linked?) forms.

sfoster1

Registered User.
Local time
Today, 14:38
Joined
Nov 28, 2001
Messages
19
First of all, the more I read here, the more I realize I'm in over my head. Also, I see I've violated many db conventions. I need to learn db and Access from the ground up. Any suggestions on how to do that?

More immediately, I am a school teacher volunteering to build a database for our school counselors to use to track at-risk students. It is set up so that the counselor inputs some basic student info in the Student table. Then, if the case warrants, the counselor moves to a 2nd level checklist of things that must be completed before further action can be taken on the student's behalf. Then there may be an Intervention Plan and follow-up checklists that have to be filled out as the case progresses.

The problem I have is that I can't figure out how to keep the current student active when I move to another form (and show the student's name). I have tried using an unbound text box, but think I am improperly citing the record or row sources.

Attached is a stripped down version of my database.

One of the actions I am trying to do is to move from the
Students form to the Level 2 Checklist form via the command button on the Students form. That works, but no student name on the form when I get there.

Mile-O-Phile and all you other db wizards, my apologies for my sheer ignorance of proper design.
 

Attachments

S,

You had the DoCmd.OpenForm syntax right, but commented it
out.

I also put a default value for the student ID field on the
second form, and displayed the name using a DLookUp
in the form's OnCurrent event.

Enjoy ...

Wayne
 

Attachments

Thanks.

WayneRyan,
Wow...Thanks for the quick response. I will work with what you gave me to try to understand where I was goofed. I had commented out some commands because I was trying alternate versions to try to make it work. I'll take a close look at the DLookup. If all goes well, I'll be able to implement it into my movement to other forms.

If I may ask two follow-ups... 1) based on what I am trying to achieve, am I right to use a linked form rather than a subform? 2) is there a place on this forum for recommended paths to access enlightenment for newbies like myself or can you offer your own suggestions? Thanks again.
 
s,

Your approach is right, you just need to refine the mechanics
of it. You can do some research on "Master-Child" links and
then Access will do most of the work for you.

If you use the search facility here and look for "books"
you should find some guidance.

It is very helpful, to post questions here and study other
threads. I have been into software for many years, but
am self-taught in Access, mainly from here and experimenting
with the software.

See ya,

Wayne
 
sfoster,

Code:
Private Sub Form_Current() 
Me.StudentName = DLookup("[Student First Name]" & ", " & _
                         "[Student Last Name]", _
                         "Students", _
                         "[Stud ID] = " & Forms![Students]![Stud ID]) 
End Sub

Wayne
 

Users who are viewing this thread

Back
Top Bottom