Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / September 2005

Tip: Looking for answers? Try searching our database.

Problem using form as criteria in query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
franky - 19 Sep 2005 20:08 GMT
I have a form with an input box that has a default value set.  I then have a
query that is using this value as criteria (Forms!frmTest!txtValue).  When
the query is ran the value is not being picked up in the query.  Its showing
as empty.  If I physically type in a value in the form it works.  How do I
get a query to work with default values from a form field?  I also tried
putting the Forms!frmTest!txtValue as a parameter in the query.  Did not help.

Thanks in advance.
Ofer - 19 Sep 2005 20:33 GMT
If it is a fixed default value, then try using the IIF

Where FieldName = IIF(Forms!frmTest!txtValue = "" Or Forms!frmTest!txtValue
is null,"Inser here the Default Value",Forms!frmTest!txtValue)

Signature

I hope that helped
Good luck

> I have a form with an input box that has a default value set.  I then have a
> query that is using this value as criteria (Forms!frmTest!txtValue).  When
[quoted text clipped - 4 lines]
>
> Thanks in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.