waylander32
Registered User.
- Local time
- Today, 18:34
- Joined
- Oct 20, 2010
- Messages
- 20
HI
hoping someone can help me
I hope this will make sense
I have a form that calculate the price of a job ( using a query to retrieve and calculate the data )
This form is used in two main forms ( as a subform ). The fields that need to be passed to the query are the same on each of the main forms
The only solution I can think off at the minute is to create another query and another subform but would rather avoid this. I have tried creating a public function that takes the criteria from the open form ( which is below ) but it won't work.
Function getjobref() As String
getjobref = Forms(Screen.ActiveForm.Name).JOB_REF.value
End Function
VBA is not my strong point
any idea would be appreciated
hoping someone can help me
I hope this will make sense
I have a form that calculate the price of a job ( using a query to retrieve and calculate the data )
This form is used in two main forms ( as a subform ). The fields that need to be passed to the query are the same on each of the main forms
The only solution I can think off at the minute is to create another query and another subform but would rather avoid this. I have tried creating a public function that takes the criteria from the open form ( which is below ) but it won't work.
Function getjobref() As String
getjobref = Forms(Screen.ActiveForm.Name).JOB_REF.value
End Function
VBA is not my strong point
any idea would be appreciated