Moten then one criteria to open a form with specific data

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

Marco

Hello.

I usually use this kind of code to open a open a specify the that that I
want to see.

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

But I need to specify moe then one criteria. can I do it from the form code
or do I have to go to the query?

I need soemthing looked like this:

» stLinkCriteria = "[Bud_Periodo_Dept_Rubrica]=" & "'" &
Me![Bud_Periodo_Dept_Rubrica] & "'" And me![NumeroPeriodo]

Is it possible?

PS: Please say yes.
 
Hi,

I'm sorry from the bad english.

Yes, you understand my problem. I use to work with this kind of
stLinkCriteria to open forms with specific data on the second form.

Now I have a problem and I need to specify more then one criteria/filter to
open the second form with the specific data.

I did what you told me and it returns an error with the following message:
"Type Mismatch".

What can I do? Try to change the query behind the form?

Thanks,
Marco

Marshall Barton said:
Marco said:
I usually use this kind of code to open a open a specify the that that I
want to see.

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

But I need to specify moe then one criteria. can I do it from the form code
or do I have to go to the query?

I need soemthing looked like this:

» stLinkCriteria = "[Bud_Periodo_Dept_Rubrica]=" & "'" &
Me![Bud_Periodo_Dept_Rubrica] & "'" And me![NumeroPeriodo]


Please proof read and correct your typos before posting. It
is very difficult to read as it is.

I think that kind of thing would be more like:

stLinkCriteria = "Bud_Periodo_Dept_Rubrica='" & _
Me.Bud_Periodo_Dept_Rubrica & _
"' And NumeroPeriodo = " & Me.NumeroPeriodo
 
Back
Top