Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The Return Command

Status
Not open for further replies.

stoneferry

Technical User
May 10, 2007
7
0
0

Apologies for the poor question, I'm lacking in reference material at the moment.

I'm stuck on the VBA Access Return command. I'd like to return data from a module, to the source, however I don't know the syntax and I'm getting "Compile Error: Expected: End of statement"


My code so far, (although it's in draft form if it seems pointless at present). I'd like to pass 'result0101' back.


Function Con_0101(arg1 As String) As String

Public result0101 As String

result0101 = "this is a test for 0101"

Return result0101

End Function




And second question, where can I get a decent reference guide for simple command look-ups like this. The Microsoft help file doesn't seem to help.

Cheers
Stoneferry
 
Use the name of the function:

Code:
Function Con_0101(arg1 As String) As String

Public result0101 As String

result0101 = "this is a test for 0101"

Con_0101=result0101

End Function


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top