473,287 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

How can a default value be inserted when running a query, enter no value?

Hi,

I want to find the way to make a query that when the user runs it and enter no value, the applicacation inserts the default value. For example, the query asks to give a certain time period (From-To). If the user inserts no value, the programme returns the default period. Is it possible?
May 29 '10 #1
1 1346
Jim Doherty
897 Expert 512MB
@anastasio86
May I suggest the you have a look at the general principle of "Query by Form" as it is generally referred to in Access.

You will get much more more control this way because you pass to the query the relevant parameters via control values on a form. You will have all the power of the forms underlying VBA at your fingertips to control what happens if a parameter value is empty and so on
May 30 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: tukaram.thatikonda | last post by:
Hi Guys, I have written a small windows application in VB.Net to test ADO.Net performance while executing long running query. The query works most of the time but fails sometime. I am trying...
1
by: Matt | last post by:
OK, this has me mad and totally stumped. I have a query that queries one Oracle table (linked). I wish to limit the query on the PROBLEM_ID record by using a value enter via a form. I have a...
6
by: Paula | last post by:
I have the following crosstab query. Can any one tell me how to get 0 for Daval when their is no value for that Value field. PARAMETERS Short; TRANSFORM First(IIf(="Screenings",,)) AS DaVal...
4
by: Kory | last post by:
How do you stop a long running query with a SQLConnection or SQLCommand? Calling Close on either just waits until the query is done. Is there a way to stop it? The following on a long query ...
24
by: ALI-R | last post by:
Hi All, First of all I think this is gonna be one of those threads :-) since I have bunch of questions which make this very controversial:-0) Ok,Let's see: I was reading an article that When...
9
by: esafran | last post by:
Hi, I've have encountered a very strange behaviour under C#. My application is registering for: Microsoft.Win32.SystemEvents.DisplaySettingsChanged &...
6
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many...
4
by: Al Williams | last post by:
Hi, I have error handling in place throughout my application. I also start the application wrapped in error handling code to catch any unexpected exceptions (i.e. exceptions that occur where I...
1
by: suslikovich | last post by:
Hi all, I am getting this error when insert values from one table to another in the first table the values are varchar (10). In the second they are datetime. The format of the data is mm/dd/yyyy...
2
by: | last post by:
Hi everyone, I have a form with a combo box on it. When you select a value (a PO#) from the combo box, the bound field is the indexID of the selected PO. On the same form, I have a text box...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.