need to use a selection from combo box in code

L

lewie

I have this code and a form so far
my_answer = InputBox(" Is " + rst1.Fields("Contactname") + " the
correct contact for " + studioname + tapetype) ' Calculate the cc
If (my_answer Like "y*") Then
Exit Do
Else
DoCmd.OpenForm "enter contact", acNormal, ,
, acFormEdit, acDialog
my_answer = Forms![enter
contact]![contact1]
End If
i open the form in dialog and they make a selection fronm the combo
box. I just haven't figured out how to pass the info back to code and
continue. i have a button that closes the form but then i can't access
their answer.
help
thanks.
Lewie
 
B

Bill

Lewie,
Pass back the results from within the sub-form code.
Example:

Private Sub Form_Close()
If Len(Me.CondLast & Me.CondFirst) > 0 Then
Forms(Me.OpenArgs)!cmboConductor = Me.CondLast & ", " & Me.CondFirst
End If

End Sub

WHERE: The name of the invoking code (form) is passed to the
sub-form. (In this example, I'm not dealing with a sub-form per se',
so the "Parent" property didn't apply.)

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top