Hi, this is pretty common.
Create a module and declare some public variables. Since these are combo boxes, I am going to assume they are bound to PKs, so the public variable should be integers.
Public pCombo1, pCombo2, pCombo3 As Integer
Now these are available throughout your VBA without declaration.
When you move from the first form with your selections to your second form with combo boxes (already made up and displaying meaningful fields) then do this on the first form's button's on click event:
pCombo1 = Me.SelectedField
pCombo2 = Me.NextSelectedField
etc, or where ever they are coming from. If they are not integer values, then you will need to modify the code accordingly.
Then on the On Load or On Open event of the second form, put this code:
Me.Combo1 = pCombo1
Me.Combo2 = pCombo2
etc
Of course, on the first form you will want to make sure that each filed has a value to pass, otherwise substitute another value.
Does this get you started?
mmcdonal
|