Filtering to pull up certain information

J

jtidwell

I have a lookup box that pulls up different contract numbers (Contractnum).
With those different contract numbers, I have a lookup box that pulls up the
different invoices with that number (Workordernum). My problem is I want to
only see the invoices for that certain contract number. Right now
(Workordernum) pulls up all the invoice numbers for the (contractnum) I
select.
 
A

Al Campagna

J,
I think you mean your WorkOrderNum brings up ALL existing Invoices,
rather than just those Invoices associated with the selected ContractNum.

So, if I understand...
The query behind the RowSource of WorkOrderNum (combo box) must contain
the ContractNum field, with a criteria of...
(assuming ContractNum is on the main form)

=Form!frmYourMainFormName!ContractNum

You'll need to code a Requery for the WorkOrderNum on the AfterUpdate
event of ContractNum.

Now... WorkOrderNum should only show Invoices associated with the
selected ContractNum.

I have a 93 and 2003 sample file on my website below called Synched
Combos. It will show how the above is implemented.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
J

jtidwell

When you select (contractnum) on my form, it brings up all the information
associated with that "contractnum". I have it set up when you select the
"contractnum" a new invoice generates for that specific "contractnum". For
example if I select the "contractnum" A9000101F then a new invoice would
generate F1006. The invoices generate Sequential. Now, I have a Invoice
Lookup box that looks up all the invoices. Now what I want to do is only
look up the invoices for lets say "contractnum" A9000101G, then what ever
invoices would come up in the lookup box(G1002, G1003, ect). I have it
where all the invoices pull up in the look-up box. I want to only see the
invoices by the "contractnum" I select.
 
C

Chris

What is the Parent->Child relationship between the two? You should have some
link between the two. Use that link as the filter criteria for the lookup
box. Use a refresh on change event to "refresh" the lookup box filter.
 
J

jtidwell

I do not understand.



Chris said:
What is the Parent->Child relationship between the two? You should have
some
link between the two. Use that link as the filter criteria for the lookup
box. Use a refresh on change event to "refresh" the lookup box filter.
 
J

Jeanette Cunningham

Hi,
I think us volunteers are having trouble understanding how your form is set
up.
Below is some of the info you sent:
When you select (contractnum) on my form, it brings up all the information

associated with that "contractnum". I have it set up when you select the

"contractnum" a new invoice generates for that specific "contractnum". For

example if I select the "contractnum" A9000101F then a new invoice would

generate F1006. The invoices generate Sequential.



I imagine that you have a form set to single form.

Make a selection from combo contractnum and the form uses a filter or find
first to show the details for that contractnum.

Is the above correct?

When the new invoice generates does the new invoice form open? how can
selecting a contractnum make the form show the details for that contractnum
and also generate a new invoice? please help me understand how your form
works.



Below is some of the info you sent:

Now, I have a Invoice Lookup box that looks up all the invoices. Now what I
want to do is only look up the invoices for lets say "contractnum"
A9000101G, then what ever invoices would come up in the lookup box(G1002,
G1003, ect). I have it where all the invoices pull up in the look-up box.
I want to only see the invoices by the "contractnum" I select.

Where is the Invoice lookup box? what form is it on? is contractnum a combo
on the same form?

Are we looking at a form with one or two subforms?



Jeanette Cunningham
 

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