By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,106 Members | 2,474 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,106 IT Pros & Developers. It's quick & easy.

subform combobox filter problem

P: n/a
I have created a bound subform on an unbound masterform linked together
with a common field (A store's identification number) using an unbound
combobox on the masterform and an invisible field on the subquery,
which filters for a particular store. The subform is in continuous
mode. So, what you see when you select a store is a list of all the
items that that have not been billed for. There is a simple yes no
field that filters out all of the items already billed for.

On the subform, I have created a combobox bound to a field on the
subform's query (simple query on a single table sorting items
alphabetically). A query was designed for the Rowsource of that
combobox. With that query, I am updating two fields in the subform
with information linked to specific items. In other words, if you pick
item a, it would, through an on change event code, update two of the
subform's query fields with the item's taxable status and a negotiated
price for that particular store, which is entered through a separate
form (table).

Where I am getting stuck is that I also want this rowsource's query
(which contains a storenumber field) to automatically pick up on the
main form's and subform's masterlinked store number field. The query
works perfectly when I test it, BUT I have to input manually the store
number. I cannot figure out how to get the store number into the
criteria box for the store's number on this rowsource's query
automatically.

So, what I am trying to do is have this combo box pick up on the
store's number, then pull up the items listed as available (a separate
table with item's taxable status and negotiated price). That way, when
the user selects a store from the main form's combobox, in the
subform's combobox he ONLY sees the items available and negotiated to
that store and the two field's for the items taxable status and
negotiated price are updated automatically when the item is selected.

When I think of trying to do it in code (and my coding skills are very
rudimentary), I don't know how to make the items name appear
automatically in the varying continous forms for a particular store.
It shows up now because of the item's rowsource query and bound status.

Can someone pleeeeeeeeeeeeeeaaaaaase help?

Thanks,

Barry

Nov 30 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Br
bc********@bigfoot.com wrote:
I have created a bound subform on an unbound masterform linked
together with a common field (A store's identification number) using
an unbound combobox on the masterform and an invisible field on the
subquery, which filters for a particular store. The subform is in
continuous mode. So, what you see when you select a store is a list
of all the items that that have not been billed for. There is a
simple yes no field that filters out all of the items already billed
for.

On the subform, I have created a combobox bound to a field on the
subform's query (simple query on a single table sorting items
alphabetically). A query was designed for the Rowsource of that
combobox. With that query, I am updating two fields in the subform
with information linked to specific items. In other words, if you
pick item a, it would, through an on change event code, update two of
the subform's query fields with the item's taxable status and a
negotiated price for that particular store, which is entered through
a separate form (table).

Where I am getting stuck is that I also want this rowsource's query
(which contains a storenumber field) to automatically pick up on the
main form's and subform's masterlinked store number field. The query
works perfectly when I test it, BUT I have to input manually the store
number. I cannot figure out how to get the store number into the
criteria box for the store's number on this rowsource's query
automatically.

So, what I am trying to do is have this combo box pick up on the
store's number, then pull up the items listed as available (a separate
table with item's taxable status and negotiated price). That way,
when the user selects a store from the main form's combobox, in the
subform's combobox he ONLY sees the items available and negotiated to
that store and the two field's for the items taxable status and
negotiated price are updated automatically when the item is selected.

When I think of trying to do it in code (and my coding skills are very
rudimentary), I don't know how to make the items name appear
automatically in the varying continous forms for a particular store.
It shows up now because of the item's rowsource query and bound
status.

Can someone pleeeeeeeeeeeeeeaaaaaase help?

Thanks,

Barry


I think what you want to do is set the subform field's defaultvalue
property to a refrence to the field on the main form?

eg. = Forms!frmsMain![ID]

I do this all the time when adding records in a subform that require the
ID from the main form.
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Dec 1 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.