A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

need to use a selection from combo box in code



 
 
Thread Tools Display Modes
  #1  
Old August 22nd, 2006, 04:14 PM posted to microsoft.public.access.reports
lewie
external usenet poster
 
Posts: 40
Default 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  
Old August 22nd, 2006, 05:25 PM posted to microsoft.public.access.reports
Bill
external usenet poster
 
Posts: 191
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.