I have a tab control with multiple subforms. My goal is to pass a current product ID from the main form into one of the subforms chosen by the user and have it display/populate all its fields based on the product ID when the event PID.GotFocus happens. I started with one subform and it worked. But then when I did another one, with almost identical code (simple DAO recordset query), this time when it's opened it doesn't do anything until I click on it then the data will display. If I don't click the subform only the PID is shown on it, that tells me the event PID.GotFocus did occur but the event handler didn't execute. Do you know why it behaves differently?
Furthermore if I pass the PID by hand in the subform load event and run PID.SetFocus then the data will display automatically next time I open it. But it won't work since the PID must be passed from the main form.
Furthermore if I pass the PID by hand in the subform load event and run PID.SetFocus then the data will display automatically next time I open it. But it won't work since the PID must be passed from the main form.