Where Statement

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
 
S

Steve Schapel

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
 

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

Top