Form, query problems... (1 Viewer)

DT

Registered User.
Local time
Today, 00:09
Joined
Oct 23, 2000
Messages
83
If I put this in the criteria field (minus the quotes) "<>8" the query works find. If I try to capture the same info coming from a form with this in the criteria field (minus the quotes) "[Forms]![formname]![textfield]" it doesn't work. Any suggestions?

Thanks in advance.

DT
 

MSAccessRookie

AWF VIP
Local time
Today, 03:09
Joined
May 2, 2008
Messages
3,428
I am not sure I have enough information to make a comment. How about showing the SQL for the query that you want to modify?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:09
Joined
Aug 30, 2003
Messages
36,138
Wouldn't you want:

<>[Forms]![formname]![textfield]
 

DT

Registered User.
Local time
Today, 00:09
Joined
Oct 23, 2000
Messages
83
Wouldn't you want:

<>[Forms]![formname]![textfield]

pbaldy,

You are correct, that works. But how come I can't grab the <> from the form? If I place them directly in the query it works. I would like to have the query grab them from the form.

DT
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:09
Joined
Aug 30, 2003
Messages
36,138
If you're trying to build some sort of flexible search tool, you'll have to build the SQL dynamically in code based on the user's selections.
 

DT

Registered User.
Local time
Today, 00:09
Joined
Oct 23, 2000
Messages
83
If you're trying to build some sort of flexible search tool, you'll have to build the SQL dynamically in code based on the user's selections.

ok...that's beyond me, but I'll look into it...Thanks
 

Users who are viewing this thread

Top Bottom