Forms, SubForms and Queries - II

DreamGenius

Annoying Questionner
Local time
Today, 22:57
Joined
Jul 29, 2004
Messages
116
I have a form where users enter search criteria. On clicking a button, the subform should display the data from a table that satisifes the query.

What I find is that the search box that contains data that will be found in a text field works. The two search boxes that contain data that will be in numeric fields don't.

I've tried [LOCAL_WWUAPINVAPPR].[PROXY] = Val ([Forms]![Frm Inv Appr Picker]![PickProxy]) and Str([LOCAL_WWUAPINVAPPR].[PROXY])=[Forms]![Frm Inv Appr Picker]![PickProxy] in the query criteria but neither behaves as expected.

Clue? :confused:
 
Don't you just love Access!

DreamGenius said:
I've tried [LOCAL_WWUAPINVAPPR].[PROXY] = Val ([Forms]![Frm Inv Appr Picker]![PickProxy]) and Str([LOCAL_WWUAPINVAPPR].[PROXY])=[Forms]![Frm Inv Appr Picker]![PickProxy] in the query criteria but neither behaves as expected.
I've solved my own problem!

The correct syntax was Trim (Str ([LOCAL_WWUAPINVAPPR].[PROXY])) = [Forms]![Frm Inv Appr Picker]![PickProxy] because Access was adding a leading space to the string when converting from a number! :mad:
 

Users who are viewing this thread

Back
Top Bottom