P
Paul Fenton
I have a form where each record has, among others, a JOBID field, a
CONTRACTOR field and a TASK field. The JobID will be the same for
every record, but there could be a variety of Contractors and Tasks.
I have a button on this form, with each record, and I want to open a
second form which will show all the task records for this JOBID and
this CONTRACTOR. Here's the OnClick event for that button.
stLinkCriteria = "[JobID]=" & "'" & Me![JobID] & "'"
stLinkCriteria = stLinkCriteria & " and [contractor]=" & "'" &_
Me![txtContractor] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
I get an error here, "The OpenForm Action was Cancelled" and the form
won't open.
If I use just one criteria, JobID for example, the new form opens
fine.
Paul Fenton
(e-mail address removed)
CONTRACTOR field and a TASK field. The JobID will be the same for
every record, but there could be a variety of Contractors and Tasks.
I have a button on this form, with each record, and I want to open a
second form which will show all the task records for this JOBID and
this CONTRACTOR. Here's the OnClick event for that button.
stLinkCriteria = "[JobID]=" & "'" & Me![JobID] & "'"
stLinkCriteria = stLinkCriteria & " and [contractor]=" & "'" &_
Me![txtContractor] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
I get an error here, "The OpenForm Action was Cancelled" and the form
won't open.
If I use just one criteria, JobID for example, the new form opens
fine.
Paul Fenton
(e-mail address removed)