If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
need to use a selection from combo box in code
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 |
#2
|
|||
|
|||
need to use a selection from combo box in code
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 WHE 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 "lewie" wrote in message ups.com... 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 |
Thread Tools | |
Display Modes | |
|
|