5.3 KiB
Util Result2
Analysis generated on: 4/1/2025 4:04:12 PM
Record Source
Controls
Control Name | Reference |
---|---|
ACTIV | ACTIV (from Tables/Util Selection C1) |
PHANT | PHANT (from Tables/Util Selection C1) |
MAKE# | MAKE# (from Tables/Util Selection C1) |
ITTYP | ITTYP (from Tables/Util Selection C1) |
USAGE | USAGE (from Tables/Util Selection C1) |
PMNAS | PMNAS (from Tables/Util Selection C1) |
WOQTY | WOQTY (from Tables/Util Selection C1) |
BSIZE2 | BSIZE2 (from Tables/Util Selection C1) |
PartNumber | PartNumber (from Tables/Util Selection C1) |
Flag | Flag (from Tables/Util Selection C1) |
PartName | PartName (from Tables/Util Selection C1) |
CutType | CutType (from Tables/Util Selection C1) |
PunchOption | PunchOption (from Tables/Util Selection C1) |
PunchNumber | PunchNumber (from Tables/Util Selection C1) |
PunchPartsPerStrip | PunchPartsPerStrip (from Tables/Util Selection C1) |
PunchStd | PunchStd (from Tables/Util Selection C1) |
GrainDir | GrainDir (from Tables/Util Selection C1) |
GrainNone | GrainNone (from Tables/Util Selection C1) |
FirstDim | FirstDim (from Tables/Util Selection C1) |
SecDim | SecDim (from Tables/Util Selection C1) |
PartsPerBlank | PartsPerBlank (from Tables/Util Selection C1) |
PartsPerSheet | PartsPerSheet (from Tables/Util Selection C1) |
BlocksPerSheet | BlocksPerSheet (from Tables/Util Selection C1) |
BlanksPerBlock | BlanksPerBlock (from Tables/Util Selection C1) |
PartHeight | PartHeight (from Tables/Util Selection C1) |
PartWidth | PartWidth (from Tables/Util Selection C1) |
BotTrimCut | BotTrimCut (from Tables/Util Selection C1) |
TopTrimCut | TopTrimCut (from Tables/Util Selection C1) |
ActualPartHeight | ActualPartHeight (from Tables/Util Selection C1) |
ActualPartWidth | ActualPartWidth (from Tables/Util Selection C1) |
PartSize | PartSize (from Tables/Util Selection C1) |
GrossWt | GrossWt (from Tables/Util Selection C1) |
ActualWt | ActualWt (from Tables/Util Selection C1) |
Utilization | Utilization (from Tables/Util Selection C1) |
SheetSize | SheetSize (from Tables/Util Selection C1) |
CalculationStatus | CalculationStatus (from Tables/Util Selection C1) |
Field113 | MetalType (from Tables/Util Selection C1) |
Field113 (Row Source) | Tables/[metalQ1]; |
BestSheetSet | BestSheetSet (from Tables/Util Selection C1) |
MachineName | MachineName (from Tables/Util Selection C1) |
VBA Code
Option Compare Database
Option Explicit
Private Sub Command120_Click()
On Error GoTo Err_Command120_Click
DoCmd.GoToRecord , , acNext
Exit_Command120_Click:
Exit Sub
Err_Command120_Click:
MsgBox Err.Description
Resume Exit_Command120_Click
End Sub
What it does
Command120 Click Event Handler
Overview
This is a VBA code module that handles the click event of a command button with ID 120. When the button is clicked, it performs the following actions:
Code Breakdown
Option Statements
The code begins with two Option
statements:
Option Compare Database
: This statement specifies that string comparisons in this code module should be performed as if they were case-insensitive when comparing database strings.Option Explicit
: This statement requires that all variables declared within the code must be explicitly initialized or passed to a procedure.
Command120 Click Event Handler
The Private Sub
declaration defines a new subroutine called Command120_Click
. When this button is clicked, this event handler will be invoked:
Private Sub Command120_Click()
On Error Handling
The next statement sets up error handling for the code within the Command120_Click
subroutine. If an error occurs while executing this subroutine, it will jump to the designated error-handling label and display the error message:
On Error GoTo Err_Command120_Click
Moving to Next Record
Inside the Command120_Click
event handler, there is a call to the DoCmd.GoToRecord
method, which moves the current record in the active database table to the next record. This action assumes that the records are ordered by their primary key or some other unique identifier.
DoCmd.GoToRecord , , acNext
Exit Event Handler
After moving to the next record, the code exits the Command120_Click
subroutine:
Exit_Command120_Click:
Exit Sub
Error Handling Resume
If an error occurs within the Command120_Click
event handler while executing this code block, it will display the error description using a message box and resume execution from the next statement after the Err_Command120_Click
label:
Err_Command120_Click:
MsgBox Err.Description
Resume Exit_Command120_Click
Notes
- This code assumes that the
Command120
button is in an Access database, and it has a specific ID of 120. - The
DoCmd.GoToRecord
method moves to the next record based on its primary key or other unique identifier.
This event handler provides basic functionality for navigating through records within a database table when the specified button is clicked.