I apologize if this has been posted already. I have looked at several examples of coding that people have posted but I cannot figure out my problem. I am sure it is a simple problem for someone who has more coding knowledge than I do. I have a function which prompts you for a fund number. This is working fine.
********************************
Function StrDSTFundNumber()
Dim DSTFundNumber As Long
DSTFundNumber = InputBox("Enter DST Number", "DST Number")
End Function
********************************
Now my problem is that I have another function that performs several different tasks. Here is the beginning of the code.
********************************
Function UpdateBlueSkyFund(paramDSTFundNumber As Long)
Const ALL_BUT_THRESHOLD = 25
Dim strOpenStatesBuffer As String
Dim strClosedStatesBuffer As String
Dim lngOpenStates As Integer
Dim lngClosedStates As Integer
Dim recBlueSky As Recordset
Dim lngStateCounter As Integer
Dim recStateCodes As Recordset
Dim strStateCode As String
Dim lngFields As Integer
Dim strFinalPhrase As String
Dim strForeignBuffer As String
Dim lngDSTFundNumber As Long
Dim db As Database
' Trap blank DSTFundNumber parameter
If IsNull(paramDSTFundNumber) Or paramDSTFundNumber = 0 Or paramDSTFundNumber < 0 Then Exit Sub
lngDSTFundNumber = paramDSTFundNumber
' Setup Variables
strOpenStatesBuffer = ""
strClosedStatesBuffer = ""
strForeignBuffer = ""
lngOpenStates = 0
lngClosedStates = 0
lngStateCounter = 0
*****************************
Now my problem is that I need to get the DSTFundNumber from the first function to be the value used in the 2nd function. I have the two functions individually, but I cannot figure out how to put them together. The DSTFundNumber in the first function is the (paramDSTFundNumber) in the second function.
I hope this makes sense. Any help would be appreciated. Thanks in advance!
********************************
Function StrDSTFundNumber()
Dim DSTFundNumber As Long
DSTFundNumber = InputBox("Enter DST Number", "DST Number")
End Function
********************************
Now my problem is that I have another function that performs several different tasks. Here is the beginning of the code.
********************************
Function UpdateBlueSkyFund(paramDSTFundNumber As Long)
Const ALL_BUT_THRESHOLD = 25
Dim strOpenStatesBuffer As String
Dim strClosedStatesBuffer As String
Dim lngOpenStates As Integer
Dim lngClosedStates As Integer
Dim recBlueSky As Recordset
Dim lngStateCounter As Integer
Dim recStateCodes As Recordset
Dim strStateCode As String
Dim lngFields As Integer
Dim strFinalPhrase As String
Dim strForeignBuffer As String
Dim lngDSTFundNumber As Long
Dim db As Database
' Trap blank DSTFundNumber parameter
If IsNull(paramDSTFundNumber) Or paramDSTFundNumber = 0 Or paramDSTFundNumber < 0 Then Exit Sub
lngDSTFundNumber = paramDSTFundNumber
' Setup Variables
strOpenStatesBuffer = ""
strClosedStatesBuffer = ""
strForeignBuffer = ""
lngOpenStates = 0
lngClosedStates = 0
lngStateCounter = 0
*****************************
Now my problem is that I need to get the DSTFundNumber from the first function to be the value used in the 2nd function. I have the two functions individually, but I cannot figure out how to put them together. The DSTFundNumber in the first function is the (paramDSTFundNumber) in the second function.
I hope this makes sense. Any help would be appreciated. Thanks in advance!