macro help needed

J

JohnE

I have a macro designed that is used in a right mouse click event on a
textbox (PSID) on form1, which is a continuous form. It is a simple GO TO
and it opens up another form, form2, which is a single form. But, I need to
call the following;

Public Sub FindPackingSlip(ByVal slip_number As Long)

so that when form2 opens, it is on the packing slip from the textbox in
form1 that the right click was done on. I get it to work with the exception
of passing in the above info.

If someone is savvy in macros, I can use the help as to how and where to
pass the the info above into.

Thanks.

John
 
K

Ken Snell

Use the Where argument of the OpenForm action in a macro to tell Form2 which
record is to be shown. No need for a "GoTo" nor calling the sub.
 
J

JohnE

Ken, thanks for the response. I was able to actually shorten the macro and
function that it was calling and got the results I was was looking for on the
right mouse click. I guess the proverb... "can't see the forest for the
trees" came into play here. Wasn't seeing what was really needed because of
too much code in the way.
John
 

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