Row Source in combo box

P

Pete

The records in my database are made up of different hospitals. I have a form
that contains all the data needed for each hospital. A switchboard lets the
user select different groups of hospital - a macro then loads the form with a
different query. This works fine.

There is a combo box on the form which is used to navigate to a chosen
hospital. The problem I have is that it always contains every hospital in
the database rather than just the ones in the query the macro has run.

I suspect the property I need to change on the combo box is Row Source which
currently is static : it is currently SELECT etc etc FROM [ACCOUNTS QUERY1 -
ALL];
I have no idea how to make it dynamic ! Thanks in advance for any help.
 
S

Steve Schapel

Pete,

When you say "a macro then loads the form with a different query", what
does this really do? Is this a macro with a SetValue action that
manipulates the Record Source property of the form? If so, you could
add another SetValue action to the same macro, to similarly manupulate
the Row Source of the combobox.
 
P

Pete

Perfect ! - Thanks Steve. I'd not used the SetValue action before but have
used it now and found loads of other uses for it !

Steve Schapel said:
Pete,

When you say "a macro then loads the form with a different query", what
does this really do? Is this a macro with a SetValue action that
manipulates the Record Source property of the form? If so, you could
add another SetValue action to the same macro, to similarly manupulate
the Row Source of the combobox.

--
Steve Schapel, Microsoft Access MVP
The records in my database are made up of different hospitals. I have a form
that contains all the data needed for each hospital. A switchboard lets the
user select different groups of hospital - a macro then loads the form with a
different query. This works fine.

There is a combo box on the form which is used to navigate to a chosen
hospital. The problem I have is that it always contains every hospital in
the database rather than just the ones in the query the macro has run.

I suspect the property I need to change on the combo box is Row Source which
currently is static : it is currently SELECT etc etc FROM [ACCOUNTS QUERY1 -
ALL];
I have no idea how to make it dynamic ! Thanks in advance for any help.
 

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