Thread: OpenForm Macro
View Single Post
  #3  
Old May 22nd, 2010, 05:58 PM posted to microsoft.public.access
dirtrhoads
external usenet poster
 
Posts: 15
Default OpenForm Macro

Wolfgang,

Thank you for your suggestion, but unfortunately that didn't work. When it
entered it exactly as you had it it gave me an error that says "You may have
specified a control that wasn't on the current object without specifying the
correct form or report context". So I entered this into the WHERE clause:

="PO_Number = " & [Forms]![Order Details]![PO_Number]

but this gave me another error stating that form i referenced was either
closed or did not exist.

So, i opened the form, minimized it and then ran the macro again and it
asked me for a parameter and I'm assuming this is because my PO Numbers are
alpha numeric...?

I'd like to be able to double click the PO Number from subform without
having to have Order Details open/minimized, and also not to have to enter
the Alpha parameter... will this be possible?

Thanks you,
Amy

"Wolfgang Kais" wrote:

Hello Amy.

"dirtrhoads" (Amy) wrote:
I have set up an OpenForm macro on a double click event in a subform.
The subform is titled Active Orders at Belmont Subform. The form I
have set to open is Order Details. I have set up the macro to open
Order Details when I click on the PO_Number from my subform and it
opens perfect, however, I want it to open up to the record I double
clicked. As of right now, it is opening up to the first record.
I tried typing in PO_Number in the WHERE clause but this caused the
event to open up to a New Record...


The WHERE clause sould have the form "PO_Number = 123". Since the number
depends on a field of the current record, this WHERE clause has to be
calculated. Try something like this in the argument:
="PO_Number = " & [PO_Number]

--
Regards,
Wolfgang


.