More then one criteria to open a form with specific data

  • Thread starter Thread starter Marco
  • Start date Start date
M

Marco

Hi. I already put this post here but it was with a very poor English. I hope
this time my english is a little bit better.

So, I use to use this type of code to open a form from another form:

stLinkCriteria = "[Bud_Periodo_Dept_Rubrica]=" & "'" &
Me![Bud_Periodo_Dept_Rubrica] & "'"

But now I have a problem that I think that I only will solve if this
stLinkCriteria have more then one Criteria/Filter.

I already try this code: stLinkCriteria = "[Bud_Periodo_Dept_Rubrica]=" &
"'" & Me![Bud_Periodo_Dept_Rubrica] & "'" And [NumeroPeriodo] =
me![NumeroPeriodo]

But this code returns me a error message: "Type Mismatch".

How can I solve this problem?

Regards,
Marco
 
Marco said:
Hi. I already put this post here but it was with a very poor English.
I hope this time my english is a little bit better.

So, I use to use this type of code to open a form from another form:

stLinkCriteria = "[Bud_Periodo_Dept_Rubrica]=" & "'" &
Me![Bud_Periodo_Dept_Rubrica] & "'"

But now I have a problem that I think that I only will solve if this
stLinkCriteria have more then one Criteria/Filter.

I already try this code: stLinkCriteria =
"[Bud_Periodo_Dept_Rubrica]=" & "'" & Me![Bud_Periodo_Dept_Rubrica] &
"'" And [NumeroPeriodo] = me![NumeroPeriodo]

But this code returns me a error message: "Type Mismatch".

How can I solve this problem?

Get your quotes correct...

stLinkCriteria = "[Bud_Periodo_Dept_Rubrica]='" &
Me![Bud_Periodo_Dept_Rubrica] & "' And [NumeroPeriodo] = " &
me![NumeroPeriodo]
 
Thanks man. it worked very well.

But now I have another problem, Do you know how to make a child link with a
master link using two criterias?

Regards,
Marco

Rick Brandt said:
Marco said:
Hi. I already put this post here but it was with a very poor English.
I hope this time my english is a little bit better.

So, I use to use this type of code to open a form from another form:

stLinkCriteria = "[Bud_Periodo_Dept_Rubrica]=" & "'" &
Me![Bud_Periodo_Dept_Rubrica] & "'"

But now I have a problem that I think that I only will solve if this
stLinkCriteria have more then one Criteria/Filter.

I already try this code: stLinkCriteria =
"[Bud_Periodo_Dept_Rubrica]=" & "'" & Me![Bud_Periodo_Dept_Rubrica] &
"'" And [NumeroPeriodo] = me![NumeroPeriodo]

But this code returns me a error message: "Type Mismatch".

How can I solve this problem?

Get your quotes correct...

stLinkCriteria = "[Bud_Periodo_Dept_Rubrica]='" &
Me![Bud_Periodo_Dept_Rubrica] & "' And [NumeroPeriodo] = " &
me![NumeroPeriodo]
 
Marco said:
Thanks man. it worked very well.

But now I have another problem, Do you know how to make a child link
with a master link using two criterias?

Separate them with semi-colons.
 
Back
Top