OpenReport macro

  • Thread starter K90267000 via AccessMonster.com
  • Start date
K

K90267000 via AccessMonster.com

Hi all, I am a newbie in using ACCESS 2007

On FORM1, I have a text field named TEXT1 and a button COMMAND1.
On REPORT1 I have FIELD1.

My intention:

User enter text into TEXT1, and click COMMAND1, will open REPORT1, showing
FIELD1 matching TEXT1.
I am using the macro build, to create a On Click event on COMMAND1.

Action:OpenReport
Report Name : REPORT1
View : Report
Filter:
Where:[FIELD1]=[Forms]![FORM1]![TEXT1] <<<<<<<<<<<<<<<<< Did not work!
Window Mode : Normal

What works............WHERE: [FIELD1]="John Tan" <<<<<<<<<<<<<<<<<< Works!

Can someone help me out please?
Thanks!
 
G

Guest

Hi K9,

Not sure this is the answer, but the default property for a control is
usually the 'value', while text that has just been entered (and has not been
committed (saved)) is returned with the 'text' property. So, you may try:

Where:[FIELD1]=[Forms]![FORM1]![TEXT1].text

Hope that helps,
CW
 
K

K90267000 via AccessMonster.com

thanks CW,
i tried using the ".text" extension....still no joy :(

Cheese_whiz said:
Hi K9,

Not sure this is the answer, but the default property for a control is
usually the 'value', while text that has just been entered (and has not been
committed (saved)) is returned with the 'text' property. So, you may try:

Where:[FIELD1]=[Forms]![FORM1]![TEXT1].text

Hope that helps,
CW
Hi all, I am a newbie in using ACCESS 2007
[quoted text clipped - 18 lines]
Can someone help me out please?
Thanks!
 
K

K90267000 via AccessMonster.com

Finally solved!

WHERE CONDITION : = "FIELD1 LIKE '*" & [Forms]![FORM1]![Text1] & "*'"

will open the report with records containing text entered by users in TEXT1
 

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