Getting data into form

  • Thread starter Thread starter google3luo359
  • Start date Start date
G

google3luo359

Hi Folks,

I did a search on this but couldn't find anything obvious for my case.

I have two tables so far:
TableA with StudentNum, StudentLast, StudentFirst, StudentPass
TableB with StudentNum, Goal, Objectives, Other

I'm setting up a password form that will open up a second form for data
entry.
The password form has two fields:
StudentNum and StudentPass
The student enters their # from a dropdown list and then enters their
pass which opens up the second main data entry form.

Right now I can throw the Student number into the StudentNum field on
the second form.
I need help in throwing the StudentLast and StudentFirst onto the
second form.

The following is working for getting the password to open the second
form
If Me!txtPassword = Me!cboStudNum.Column(3) Then
DoCmd.OpenForm "frmPlan"

and when the second form opens (frmPlan), the following code assigned
to a field:
=[Forms]![frmPassPlan]![cboStudNum]
succeeds in passing the student number into this field.

But I'm having trouble getting the StudentLast and First into their
fields.

I don't know if I should get the values from the original table or from
the Password form as I have done for the StudentNum.

Thanks in advance!

Ric
 
You could try putting them into columns in the combo box cboStudNum. Then use
VB code after you open the form like;

Forms!frmPlan!StudentFirst.Value = Forms!frmPassPlan!cboStuNum.Column(4)

as you have done in the IF which opens the form.
 

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