Solved Passed Parameter Arrives too late? (1 Viewer)

ClubSean

New member
Local time
Today, 04:55
Joined
Nov 8, 2023
Messages
4
I have a "GenericPicker" form that I use to update the genres, directors, and actors associated with a movie record. The code behind
"EDIT CAST" button (for example) is attached.


Everything "GenericPicker" needs is passed from the calling form. Similar code is executed for genre or director editing. Functionality works fine.

I would like to set a custom icon in the "GenericPicker" Title Bar. I know how to set an icon from the Load_Event. I don't know how to tell the form which icon to use. Passing the ".txtEditType.Value = "A" (for Actor) doesn't work since the form is already loaded before the "With Forms" block is executed and therefore any attempt to utilize a "GenericPicker" event (OPEN, LOAD, RESIZE, ACTIVATE, CURRENT) is too late. Can I use anything in the "With Forms" block to trigger an event in the loaded "GenericPicker" form that I can use to set the icon I want.

Passing parameters in the DoCmd.OpenForm are of the "Where clause" type and not appropriate here.

I don't want to go back to 3 separate PICKER's

Comments?
 

Attachments

  • Sample code.txt
    486 bytes · Views: 47

ClubSean

New member
Local time
Today, 04:55
Joined
Nov 8, 2023
Messages
4
Thanks guys. I had an epiphany: the key is to use "OPENARGS"
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:55
Joined
Jul 9, 2003
Messages
16,282
I had a similar problem, where a value stored in a form custom property could not be accessed by the form events.

The solution was to create a public function in the form and run that. I named the function "fSetup".

I did a blog about it here:-

 

Users who are viewing this thread

Top Bottom