|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
VBA sub procedure has 2 parameters and no return value, but access says expecting =
I have a sub procedure that has two parameters:
Code:
Public Sub FieldState(obj As String, state As Boolean) If IsObject(Me(obj)) Then If state = True Then Me(obj).Visible = True Me(obj).Enabled = True Else Me(obj).Visible = False Me(obj).Enabled = False End If End If End Sub but when calling the procedure using: FieldState("field", 0) i get the error: Expecting: = However, I do not get this error with procedures that only have a single parameter. Any Ideas? |
|
#2
|
|||
|
|||
|
Remove the parentheses from the sub procedure call.
Code:
FieldState "field", 0 insead of: Code:
FieldState("field", 0)
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > VBA sub procedure has 2 parameters and no return value, but access says expecting = |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|