rubbernilly
Programmer
Hello all,
I posted this over in the VBA forum as well, but this might be the better venue for this question...
I have a query with a criteria parameter prompting the user to enter a value for the field. However, if a particular form is open, I want that field to pull from a particular field on that form.
I know how to tell if a particular form is open through code, but how do I still prompt the user if the form is not open?
IIF(IsFormOpen("MyFormName"),forms!MyForm.myControl,[Enter Value])
That sort of verbage prompts me for the value of the control if the form is not open, and still prompts me for [Enter Value] even if it is open.
I even looked at declaring a Function of type "parameter," but I don't know if this is right. I haven't been able to make that work.
Is there a general way to do what I'm looking for? General enough so that a function or syntax could handle various data types?
Form Open = take value from control
Form Not Open = prompt
I posted this over in the VBA forum as well, but this might be the better venue for this question...
I have a query with a criteria parameter prompting the user to enter a value for the field. However, if a particular form is open, I want that field to pull from a particular field on that form.
I know how to tell if a particular form is open through code, but how do I still prompt the user if the form is not open?
IIF(IsFormOpen("MyFormName"),forms!MyForm.myControl,[Enter Value])
That sort of verbage prompts me for the value of the control if the form is not open, and still prompts me for [Enter Value] even if it is open.
I even looked at declaring a Function of type "parameter," but I don't know if this is right. I haven't been able to make that work.
Is there a general way to do what I'm looking for? General enough so that a function or syntax could handle various data types?
Form Open = take value from control
Form Not Open = prompt