Set Form dropdown

  • Thread starter Thread starter Dale
  • Start date Start date
D

Dale

Is there a way to set 2 dropdown lists on a openform macro from a field on a
different form? If so any examples would be helpful.

Thanks.
Dale
 
Dale,

I'm afraid I don't really understand your question.

This is what I've got so far...
- You have two forms, FormA and FormB.
- From FormA you want to run an OpenForm macro to open FormB.
- On FormB there are two comboboxes.

So, what do you want to happen then?
 
Steve,

That is basically right. I have what I call an entry blank form that has an
eb number on it. I want to be able to run a macro that will open a settlement
sheet for that has a beginning eb number dropdown list and a ending number
dropdownlist on it. I want the macro to set the beginning and ending dropdown
lists so all the user has to do at that point is click on the print button.
Does that help and is it possible?

Dale
 
Dale,

I am pretty sure by "drop-down lists" you are referring to comboboxes.

So now, for the next question... How is the macro (or anyone) supposed to
"know" what eb numbers are supposed to show up in the comboboxes?

By the way, are these comboboxes Bound i.e. do they have a Control Source
set to one of the fields in the table or query that the Settlement form is
based on?

And what function do they perform? I.e. what is the point of "setting"
them?

Thanks.
 
Steve,

Yes the drop downs are combo boxes. I want the macro to take the current eb
number that is on the entry blank form and use it. The combo boxes are bound
to a query:

SELECT EB.EBNumber FROM activeShow INNER JOIN EB ON activeShow.ShowID =
EB.ShowID ORDER BY EB.EBNumber;

The settlement sheet form lets the use chose to preview or print one to many
settlement sheets based on the range of eb numbers in the beginning and end
eb number fields. I am looking for an easy way to use the macro to open up
the form and set the number so the user can just click on preview and print
and get the one settlement sheet. It saves a few seconds.

Dale
 
Dale,

Thanks for that further information.

Can you confirm that the query that you gave me is used for the *Row Source*
of the comboboxes, and not the *Control Source*?

And my earlier question remains... If you want "the macro to ... set the
number", how is the macro supposed to know what numbers to use? You have
said "take the current eb number that is on the entry blank form" - but that
doesn't tell us much really. Can you give an example please?
 
Steve,

Yes the query I sent is the row source. I want the macro to use the eb
number off of the entry blank form. The entry blank form shows the entry
blanks one by one and each one has a eb number. And entry blank consists of
an eb number, and persons name, etc. The form lets you go through these
records one by one. I want the macro to use the eb number on the entry blank
and select that number in the combo box so the user does not have to select
it themselves.

Dale
 
Dale,

What about the other combobox? Are both the comboboxes going to "set"
themselves to the same as the EB number of the current record on the entry
blank form? If so, what's the point of that?
 
Steve,

Yes both will be set to the same eb number. The settlement sheet form can be
used to run one or more settlement sheets at a time. This is not its only
use. I am looking for a way to have the user while on the entry blank form be
able to run the macro such as ctrl-s to be able to pull up the settlement
sheet form and have the combo boxes already filled out so they can view the
settlement sheet for that one entry. I want to use the same form (settlement
sheet) instead of having to build mulitple forms/reports.

Dale
 
Back
Top