Row source, should be a simply one.

G

Guest

I have two combo boxes in a form. The first combo box is "txtdatefrm" and the
source of the table is a query which contains a list of dates. The second
combobox is "txtdateto".

What I would like to do is create the list for the 2nd combo box only for
those dates greater than the date that has been chosen in the first box.

This is what I have.

SELECT [dateID].[WeekID] FROM date WHERE (([dateID].[WeekID]>[report
options].[txtdatefrm]));

It says there is a syntax error in the "FROM" clause. Not too sure why.

cheers
 
R

Rick Brandt

scubadiver said:
I have two combo boxes in a form. The first combo box is "txtdatefrm"
and the source of the table is a query which contains a list of
dates. The second combobox is "txtdateto".

What I would like to do is create the list for the 2nd combo box only
for those dates greater than the date that has been chosen in the
first box.

This is what I have.

SELECT [dateID].[WeekID] FROM date WHERE (([dateID].[WeekID]>[report
options].[txtdatefrm]));

It says there is a syntax error in the "FROM" clause. Not too sure
why.

cheers

SELECT [dateID].[WeekID] FROM date WHERE (([dateID].[WeekID]>[Forms]![report
options].[txtdatefrm]));
 
G

Guest

Thanks for the reply. I am still getting a syntax error.

Rick Brandt said:
scubadiver said:
I have two combo boxes in a form. The first combo box is "txtdatefrm"
and the source of the table is a query which contains a list of
dates. The second combobox is "txtdateto".

What I would like to do is create the list for the 2nd combo box only
for those dates greater than the date that has been chosen in the
first box.

This is what I have.

SELECT [dateID].[WeekID] FROM date WHERE (([dateID].[WeekID]>[report
options].[txtdatefrm]));

It says there is a syntax error in the "FROM" clause. Not too sure
why.

cheers

SELECT [dateID].[WeekID] FROM date WHERE (([dateID].[WeekID]>[Forms]![report
options].[txtdatefrm]));
 
G

Guest

This line is in the textbox properties. It doesn't matter whether I use the
bang or the dot, I still get a syntax error. I have based this on the
cascading combo box code. hmm

Rick Brandt said:
scubadiver said:
Thanks for the reply. I am still getting a syntax error.

In SQL I believe you have to use the bang rather than the dot.
[Forms]![report options]![txtdatefrm]

instead of
[Forms]![report options].[txtdatefrm]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top