Another query by combo box

H

harleyken

i will apologize in advance for asking again...

database set up:
table: classes available
fields: class
class size
ID (primary key)
table: Classes scheduled
fields: class type (from classes available)
start date
number of students

form: class scheduling
unbound combo box [combo2] to select class type
(based on query of classes
available, returns [ID] and [class]
need to create:
subform showing scheduled [start date] and [number of students] for type of
class shown in combo box.

code tried in subform: SELECT [sheduled classes].[class start
date],[scheduled classes].[number of students]; FROM [scheduled classes];
WHERE combo2 = [forms]![class scheduling]![combo2]

returns error: characters found after end of SQL statement

ver:2007

thanks to all who take the time to help!
 
M

Minton M

i will apologize in advance for asking again...

database set up:
table: classes available
fields: class
class size
ID (primary key)
table: Classes scheduled
fields: class type (from classes available)
start date
number of students

form: class scheduling
unbound combo box [combo2] to select class type
(based on query of classes
available, returns [ID] and [class]
need to create:
subform showing scheduled [start date] and [number of students] for type of
class shown in combo box.

code tried in subform: SELECT [sheduled classes].[class start
date],[scheduled classes].[number of students]; FROM [scheduled classes];
WHERE combo2 = [forms]![class scheduling]![combo2]

returns error: characters found after end of SQL statement

ver:2007

thanks to all who take the time to help!

In your subform SQL, you can only put a semi-colon at the very end of
the whole statement - anything after that will cause the error you're
seeing.

Hope this helps,
James
 

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