Sending & returning information from functions & forms

A

amiga1200

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
 
A

Alex Dybenko

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
 

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