Problem with linking forms.

  • Thread starter Thread starter Anthony
  • Start date Start date
A

Anthony

I have two tables.

The first Student Details and the second Schemes.

I have far too much information to go on sub-forms so i
would like to be able to create them on normal forms with
command buttons that take you to the related form.

When i have used a command button, it does not update my
key fields in the latter form that was opened.

The fields below are Primary Keys in both tables and
student details tbl to schemes tbl is a one-to-many
relationship.

LEARN_ID
PROVI_ID

I don't know if i should be using command buttons as the
way to link my forms or not.

Can anyone suggest what i should do please?

Any help is much appreciated.

Thanks

Anthony
 
With a command button you can pass a filter instruction to
the next form. Try the following but of cource adjust the
field names to tour own.

Dim stLinkCriteria as String

stLinkCriteria = "[your 2nd form foreign key]=" & "'" & Me!
[your 1st form primary key] & "'"
DoCmd.OpenForm "You 2nd form name", , , stLinkCriteria

Mail me directly if you need more help and I ca send you
an example.

Bish...
 
Back
Top