G
Guest
I have an Access 97. On one form, the user can scan or enter a number into a
control. The KeyDown event (with keycode 13) is used to check (through an IF
statement) whether a function has returned True or False. The function
itself does a lot of things like check for a valid user, that a number was
actually entered and calls 2 other functions one of which retrieves matched
data from a Visual Fox Pro data source and inserts it into the Access table.
My (perhaps dumb) question is this:
Can an IF statement be a call for a function? I have looked thoughout the
code looking for a call statement but there isn't one. Here is the code that
I believe triggers the function:
Private Sub Access_No_KeyDown(KeyCode As Integer, Shift As Integer)
'Description
'This code will insert the sample from VFP database
With Me
If KeyCode = 13 Then 'Enter
.cmdClose.SetFocus
If XYZFunction = True Then
![ControlXYZ] = ""
.ControlXYZ.SetFocus
End If
End If
End With
End Sub
control. The KeyDown event (with keycode 13) is used to check (through an IF
statement) whether a function has returned True or False. The function
itself does a lot of things like check for a valid user, that a number was
actually entered and calls 2 other functions one of which retrieves matched
data from a Visual Fox Pro data source and inserts it into the Access table.
My (perhaps dumb) question is this:
Can an IF statement be a call for a function? I have looked thoughout the
code looking for a call statement but there isn't one. Here is the code that
I believe triggers the function:
Private Sub Access_No_KeyDown(KeyCode As Integer, Shift As Integer)
'Description
'This code will insert the sample from VFP database
With Me
If KeyCode = 13 Then 'Enter
.cmdClose.SetFocus
If XYZFunction = True Then
![ControlXYZ] = ""
.ControlXYZ.SetFocus
End If
End If
End With
End Sub