Hi to the list. This is a first question for me and I am somewhat of a novice. I am developing an application to keep the transportation information for our local school district. This includes keeping track of who subs for who and what routes are run. I have a form that one field is populated using combo box whose values are Morning, Evening, and Both.
If a sub drives in the morning or evening, they collect $25 in pay. If they drive morning and evening routes they get $50. I wish co convert this information to currency for the monthly report. I have tried the following code in the on open proceedure, only to get the runtime error 2427,
you entered an expression that has no value.
Private Sub Report_Open(Cancel As Integer)
Dim stDocName as string
Dim StRan as string 'This is the field that contains Morning, etc'
Dim intRPay as Integer
stDocName = "rptSub_Pay"
stRan = Me!Ran
If stRan = "Both" Then
intRPay = "50"
ElseIf stRan = " " Then
IntRPay = "0"
Else IntRPay = "25"
End If:
End Sub
When I try to open the report I get the above error. When I try to debug the VBE highlights the line.. stRan = Me!Ran.
Can anyone shed a little light my way?
TIA
Dan Will
If a sub drives in the morning or evening, they collect $25 in pay. If they drive morning and evening routes they get $50. I wish co convert this information to currency for the monthly report. I have tried the following code in the on open proceedure, only to get the runtime error 2427,
you entered an expression that has no value.
Private Sub Report_Open(Cancel As Integer)
Dim stDocName as string
Dim StRan as string 'This is the field that contains Morning, etc'
Dim intRPay as Integer
stDocName = "rptSub_Pay"
stRan = Me!Ran
If stRan = "Both" Then
intRPay = "50"
ElseIf stRan = " " Then
IntRPay = "0"
Else IntRPay = "25"
End If:
End Sub
When I try to open the report I get the above error. When I try to debug the VBE highlights the line.. stRan = Me!Ran.
Can anyone shed a little light my way?
TIA
Dan Will