Link To Another Form @ Target?

T

Tim Fierro

Hello,

My database has a form called A/P where a vendor invoice is verified for
pricing against what the purchase order states. The form pulls information
from the PO table.

When a price on the invoice is higher than the PO price, we change the price
on the purchase order to match. Now to get our prices updated in the master
table of items, we go to the Master Item form and update the pricing for
the item in question.

I have opted to not have it done automatically such as "if invoice price
higher than po price, update table where master item is" because I don't
want it that simplistic now as we just start using this database. I would
rather have a manual entry to update that master table with the item in it.
We only get about 10 invoices a day at most really, so time is not a problem
at this stage.

What I was thinking is having some link on the A/P form that would take you
automatically to the item you want to adjust pricing for. So an invoice
would come in, a look up of the purchase order would be done, adjust pricing
if it is different on the purchase order; THEN press a link (command
button?) that would automatically open up the Master Item form at that
target item number. From there, adjust the item's price if necessary.

Right now, we only created and started using it the past month or so, is to
open up the Master Item form and then 'cursor' through to the right item. I
haven't learned yet how to best tell a form where you want to go in the
records. :)

Note: We have a Price field in the Item Table and the Purchase Order Table.
We did this so we can see the real price of that purchase order in the
future, and not pull a value from an updated price in the future.

Question: Can a link or command button be placed on a form that would open
up another form directly at the record you want to go to?

If so, naming an area of study to do this would be nice. Like what commands
I should be reviewing.

Thank you,

Tim
 
G

Guest

For the code behind your "open" button, check out "docmd.openform"
one of the parameters passed to this command is "OpenArgs"
you can pass the primary key of the default record.

In the Open event of the target form use
Me.Filter = "FieldName = " & Me.OpenArgs (for a number, or)
Me.Filter = "FieldName = '" & Me.OpenArgs & "'" (for a string)
followed by
Me.Filteron = True
 

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