Combo Box not populated in form - Dialog type

frispee

Registered User.
Local time
Today, 06:48
Joined
May 23, 2012
Messages
28
Hi,

I have a button in the main form which opens another dialog type form. This form uses some values in the main form to populate its boxes. When this form is in normal type, everything works as it should. However, when I use 'acDialog' to open the form, the form gets opened but the fields are not populated. Could anyone tell what I am doing wrong?

Thanks for your help :)
 
This is one of the If statements that helps populate the dialog type form.:

Code:
If Forms!FTAC_frm!Plant_cbx.Value = "Portland, OR" Then
Forms!Overseas_frm!ExpOrigin_tbx.Value = "Clackamas, OR"

Here FTAC_frm is the main form. Also,

Code:
DoCmd.OpenForm "Overseas_frm", acNormal, , , , acDialog

is executed before the 'If' statements.

Thanks for your reply :)
 
Your reply gave me an idea and I shifted the entire code to the second form's 'on open' event. Everything works as it should. I don't know why I didn't think of this before. :D Thanks!
 
The Load event would be better.

Glad you got it working!
 

Users who are viewing this thread

Back
Top Bottom