Where Statement

  • Thread starter Thread starter Greg Staley
  • Start date Start date
G

Greg Staley

I have 1 form in continuous forms view that I would like to have a user click
on and have it open another form to the record the the user just clicked.

I created an openform macro with the following SQL Where Condidtion

[studentid]=[Forms]![frmcounselorselect]![studentid]

studentid is the primary key for all the records
the form to open is frmCounselorSelect
the primary key for the record is also studentid

The macro opens the form, but does not bring up any record. Anyone know
how I can get that record to open?

Rip
 
Rip,

The "[studentid]" on the left of the expression refers to the field on
the frmCounselorSelect form, which is the one being opened. The form
referred to on the right of the expression should be the form you are
triggering from, i.e....
[studentid]=[Forms]![NameOfYourContinuousForm]![studentid]

- Steve Schapel, Microsoft Access MVP
 
Back
Top