andy_dyer
Registered User.
- Local time
- Today, 22:08
- Joined
- Jul 2, 2003
- Messages
- 806
Hi,
I'm trying to build something that started life as quite simple but now has grown and grown and grown...
I have a form for projects and a subform form that holds finance details i.e. top level budget etc
On this subform I have a button to open a detail sub-sub-form which shows the annual breakdown and has a button to add new years...
Then on this sub-sub-sub-form is where my challenges arise...
I want the project name, currency and exchange rate to pull through from other forms and they are not currently - I am using this code to try and pull the project ID and Currency ID through
For the exchange rate this is a calculated field using this code in the control source
This works on other forms but may not work here because the currency isn't pulling through...
I've even tried
Just to simply pull through from the main form without re-calculating
But currently nothing gets pulled through...
Any ideas how I can get these pieces of data pulled through would be gratefully received
I'm trying to build something that started life as quite simple but now has grown and grown and grown...
I have a form for projects and a subform form that holds finance details i.e. top level budget etc
On this subform I have a button to open a detail sub-sub-form which shows the annual breakdown and has a button to add new years...
Then on this sub-sub-sub-form is where my challenges arise...
I want the project name, currency and exchange rate to pull through from other forms and they are not currently - I am using this code to try and pull the project ID and Currency ID through
Code:
Private Sub Form_Load()
Dim intProjectID As Integer
Dim intCurrencyID As Integer
On Error Resume Next ' OpenArgs might be empty
If Not IsNull(Me.OpenArgs) Then
intProjectID = CInt(Me.OpenArgs) ' ProjectID passed in via OpenArgs parameter in OpenForm method
cboProjectName.Value = intProjectID
intCurrencyID = CInt(Me.OpenArgs) ' CurrencyID passed in via OpenArgs parameter in OpenForm method
cboCurrency.Value = intCurrencyID
End If
End Sub
For the exchange rate this is a calculated field using this code in the control source
Code:
=ExchangeRate([Start Date],[CurrencyID])
This works on other forms but may not work here because the currency isn't pulling through...
I've even tried
Code:
=[Forms]![frmProjectFinance]![txtExchangeRateUsed]
Just to simply pull through from the main form without re-calculating
But currently nothing gets pulled through...
Any ideas how I can get these pieces of data pulled through would be gratefully received