Sending & returning information from functions & forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to Call a function with an argument, Open a form using this
argument and return the value from an options list while closing that form,
then return to the original form.

eg
Private Sub Test()
ReturnValue = fResponse(Part Number) 'Wait for ReturnValue'
End Sub

Function fResponse(PartNumber as String)as string
Open form 'Response' with partnumber in a label
Wait for an option to be selected
An option is selected
The form is closed
A string is returned as ReturnValue
End Function

Amiga1200
 
Hi,
yes, you can open form in dialog mode (see docmd.openform method details),
then code will stop until you close or hide it, add there a button close,
which will run code me.visible=false, then you can read selected option and
close form.
HTH
 
Back
Top