vba code to open filtered form -- Run-time error 2448

G

Guest

i hava a form in my a2k app'n called "RECIST Disease Evaluation: Nontarget
Lesions" from which i select a value of "Patient Number". there's a cmdbox on
it which launches a macro which opens a form called "Lesions: Nontarget -
Baseline" which has a matching control called "Patient Number" that is linked
to a combobox. currently, i forcing the users to use the combobox to select
the value of "Patient Number" however if i were using it i would prefer to
have the benefit of a prefilled in value of the "Patient Number", Soooooo...

i wrote this small vba code which i placed on the Form Open event prop'y of
the "Lesions: Nontarget - Baseline" form and here's the error message that
ensues:

"You can't assign a value to this object".

pray tell why not, may i ask.

anyone care to help me straighten this out?

it'd be really appreciated.





Private Sub Form_Open(Cancel As Integer)
LAS_EnableSecurity Me
Me.Patient_Number.Value = Forms![RECIST Disease Evaluation: Nontarget
Lesions]![Patient Number]
End Sub
 
G

Guest

before i forget, i meant to say "there's a command button on it " not "there
a cmdbox on it ".
 

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