Record in one record matches record in another table

N

nhc los angeles

I have a Proposals table with a Project # field and a Projects table with a
Proposal # field. I want the Project # and Proposal # fields to cross
reference by adding a go to field or button. If the field is blank in a
particular record, I dont want it to go anywhere. How do I write the code?
 
M

Marshall Barton

I have a Proposals table with a Project # field and a Projects table with a
Proposal # field. I want the Project # and Proposal # fields to cross
reference by adding a go to field or button. If the field is blank in a
particular record, I dont want it to go anywhere. How do I write the code?


The command button wizard will create the code needed to
open another form.

To filter the other form's to the matching field, modify the
code to something like:

Dim stDoc As String
Dim stWhere As String
stDoc = "name of other form"
stWhere = "[Project or Proposal # field] = " & Me.[Project
or Proposal # field]
DoCms.OpenForm stDoc, WhereCondition:= stWhere
 

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