RE: Unbound Combo Box Default Value Based on Query
- From: KARL DEWEY <KARLDEWEY@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 16 Apr 2009 07:41:01 -0700
You are missing brackets -- [ ]
=SELECT Max([qPayPeriodDateUnique].[PPD]) As MaxDate FROM
qPayPeriodDateUnique;
"ScottMsp" wrote:
Karl,.
I tried your solution, but it did not work. I kept getting a syntax error
message saying, "The syntax of the subquery in this expression is incorrect.
Check the subquery's syntax and enclose the subquery in paratheses."
My line in the Default Value was:
=SELECT Max([qPayPeriodDateUnique.PPD]) As MaxDate FROM qPayPeriodDateUnique;
I tried parathesis in a few places, but could not get it to work.
I am sure it works, but it just did not work for me.
Thanks for responding and trying.
-Scott
"KARL DEWEY" wrote:
Try copying the query you are using as source for the combo to the Default
property and edit to something like this --
=SELECT Max([YourDateField]) AS MaxDate FROM YourTable;
"ScottMsp" wrote:
Hello,
I have a query based on a table. The query has one field and it is the date
the data was loaded. The query limits it to unique values as I wanted to
only see the four different dates that are loaded on the 50k+ records.
On a form in a combo box, I have been able to display those dates and select
from them which then drives other queries.
My question then is, I want the default value of the combo box to always
default to the most current date in the table. For instance if I have 4
dates (5/4/2008, 6/1/2008, 8/1/2008, and 4/5/2009), I want 4/5/2009 to be the
default value. When I load more records into the table that have a newer
date, I want the default value to be the new date.
Thanks in advance for all your help.
- Follow-Ups:
- RE: Unbound Combo Box Default Value Based on Query
- From: ScottMsp
- RE: Unbound Combo Box Default Value Based on Query
- References:
- Unbound Combo Box Default Value Based on Query
- From: ScottMsp
- RE: Unbound Combo Box Default Value Based on Query
- From: KARL DEWEY
- RE: Unbound Combo Box Default Value Based on Query
- From: ScottMsp
- Unbound Combo Box Default Value Based on Query
- Prev by Date: RE: Customize auto-number field
- Next by Date: Re: Unbound Combo Box Default Value Based on Query
- Previous by thread: RE: Unbound Combo Box Default Value Based on Query
- Next by thread: RE: Unbound Combo Box Default Value Based on Query
- Index(es):
Relevant Pages
|