RE: How can i simulate the code in Macro?
- From: ooxx <ooxx@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 25 Jul 2007 19:58:01 -0700
no,not works
glitch
"Ofer Cohen" wrote:
Try adding a single quote for the string.
Dim MyCriteria As String
MyCriteria = "[hb] Like '*" & [Forms]![searchHearB]![Ssearch] & "*' Or [de]
Like '*" & [Forms]![searchHearB]![Ssearch] & "*'"
Docmd.OpenReport "ReportName" , , , MyCriteria
--
Good Luck
BS"D
"ooxx" wrote:
Hi,
I have test the code, but it gets bugs, and I can't fix. The problem is at
the "*" when concatenated on the last of the the sentence that it should be "
to close the sentence, but I don't know how to.
Thanks,
"Ofer Cohen" wrote:
Try using code instead of a macro.
Using code you can use the Debug and step through the lines, and view each
value.
Something like
Dim MyCriteria As String
MyCriteria = "[hb] Like *" & [Forms]![searchHearB]![Ssearch] & "* Or [de]
Like *" & [Forms]![searchHearB]![Ssearch] & "*"
Docmd.OpenReport "ReportName" , , , MyCriteria
--
Good Luck
BS"D
"ooxx" wrote:
Hi all,
I need to write in procedure code when the macro is truncated the criteria.
I have two fields, and I would do in the macro on the subject of to open
report in print preview format and its where criteria as follows:
[hb] Like "*" & [Forms]![searchHearB]![Ssearch] & "*" Or [hb] Like
[Forms]![searchHearB]![Ssearch] & "*" Or [de] Like
[Forms]![searchHearB]![Ssearch] & "*" Or [de] Like "*" &
[Forms]![searchHearB]![Ssearch] Or [de] Like [Forms]![searchHearB]![Ssearch]
& "*"
I have problem to concatenate them in the code procedure.
I try from the simple but not success, the problem exists even it succeeds
in doing code format that Access can't find the field, though the fields
exists in the Report1.
Thans,
- Follow-Ups:
- RE: How can i simulate the code in Macro?
- From: Ofer Cohen
- RE: How can i simulate the code in Macro?
- References:
- RE: How can i simulate the code in Macro?
- From: Ofer Cohen
- RE: How can i simulate the code in Macro?
- Prev by Date: Required Field Code
- Next by Date: Re: Pre-fill controls in subsequent records of continuous form
- Previous by thread: RE: How can i simulate the code in Macro?
- Next by thread: RE: How can i simulate the code in Macro?
- Index(es):
Relevant Pages
|