A Veriable (what is it in VBA)

Theshowstealer

New member
Local time
Today, 09:44
Joined
Nov 2, 2004
Messages
5
I hate stuff like this but i need to do it for a school project.
This is a bit of code from my database, could someone point out the veriables to me, thanks, so i know where to go with it.


Option Compare Database

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True

End Sub

Private Sub Form_Current()
' Update the caption and fill in the list of options.

Me.Caption = Nz(Me![ItemText], "")
FillOptions

End Sub



-----------
Private Sub Command23_Click()
On Error GoTo Err_Command23_Click
'The above code says if there is an error the procedure
'will change and an error message will be output

DoCmd.GoToRecord , , acLast
'The above code makes the record to be skipped to the last when
'clicked
Exit_Command23_Click:
Exit Sub
'The above code exits the subroutine
Err_Command23_Click:
MsgBox Err.Description
Resume Exit_Command23_Click
'The above code happens if an error occurs and it will output
'a error message
End Sub

Thanks in advance.
 
There isn't any variables in the code. The nearest is Cancel which is then integer passed into your form's open event.
 
You could argue that the fields, controls, and properties are "variables", though this is kind of far fetched. Technically every bit of the language would be a variable if this was the case. So aside from ItemNumber and Argument are the only user-defined items, which look like fields. And aside from this there are no user-defined variables (as SJ had said), which you may have been looking for.

Code:
[ItemNumber] = 0           - [ItemNumber] is probably a long integer or some sort of number
[Argument] = 'Default'     - Argument is text
Me.Filter                  - Filter   is a text string
Me.FilterOn = True         - FilterOn is boolean
Me.Caption                 - Caption  is text string
 

Users who are viewing this thread

Back
Top Bottom