I'm getting this error " compile error: variable not defined"
'START: BILL OF MATERIAL & ROUTING WRITER:
Private Sub cmdWrtBOM_Click()
On Error GoTo Err_cmdBOM_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
'STAGE1: Check BOM not already writen.
Set rs = CurrentDb.OpenRecordset("S
ELECT tblOrderItems.BOM_CMPLT, tblOrderItems.ITEM_NUM " & _
"FROM tblOrderItems " & _
"WHERE (((tblOrderItems.ITEM_NUM)
=""" & [ITEM_NUM] & """));")
With rs
.MoveFirst
If rs.Fields("BOM_CMPLT") = True Then
MsgBox "ERROR: Bill of Material already written."
Set rs = Nothing
Exit Sub
End If
End With
Set rs = Nothing
'STAGE2: Check for data errors that will prevent BOM from being written, and report where necessary.
strItemNum = [ITEM_NUM]
intMold = [MOLD_ID]
dblActArea = [ACT_AREA]
dblActLU = [LU]
!!!!!!!!!!!!!!!!!!!!! dblActACT_LP = [ACT_LP]!!!!!!!!!!!!!!!!!!
!!!!!!!!!!
!!!!
dblActLE = [LE]
dblActFT = [FT]
dblActHE = [HE]
bolNoAdjust = [NO_ADJUST]
strDataError = ""
strRCFlag = [R_C_FLAG]
blnDataError = False
'ACTUAL AREA:
If dblActArea = 0 Then
blnDataError = True
strDataError = Chr(13) & " - Actual Sail Area (sqmtr): 0"
End If
'ACTUAL LUFF:
If dblActLU = 0 Then
blnDataError = True
strDataError = strDataError & Chr(13) & " - Actual Sail Luff Length (mtr): 0"
End If
'ACTUAL LP:
If dblActACT_LP = 0 Then
blnDataError = True
strDataError = strDataError & Chr(13) & " - Actual Sail LP (mtr): 0"
End If
'ACTUAL LEECH:
If dblActLE = 0 Then
blnDataError = True
strDataError = strDataError & Chr(13) & " - Actual Sail Leech Length (mtr): 0"
End If
'ACTUAL FOOT:
If dblActFT = 0 Then
blnDataError = True
strDataError = strDataError & Chr(13) & " - Actual Sail Foot Length (mtr): 0"
End If
'ACTUAL HEAD (if applicable)
If [SPLIT_SECTION] = True Then
If dblActHE = 0 Then
blnSplSec = True
blnDataError = True
strDataError = strDataError & Chr(13) & " - Actual Section Head Width (mtr): 0"
End If
End If
'FILMS:
'Check that a minimum of three films have been entered and that their Qty > 0.
Set rs = CurrentDb.OpenRecordset("S
ELECT tblSailFlmBld.ITEM_NUM, tblSailFlmBld.GRP_ID, tblSailFlmBld.Flm_ID, tblSailFlmBld.QTY " & _
"From tblSailFlmBld " & _
"WHERE ((tblSailFlmBld.ITEM_NUM)=
""" & [ITEM_NUM] & """);")
Option explicit is at the top of the form.. i was simply adding another field that is almost exactly like the others.. not sure what im missing..
Start Free Trial