Below is the code... but again, this only happens on my PC. The following MACFORM code works just fine on any other PC here. Let me add that before adding the code **on my PC**, I was obviously able to get into **TRX-Enter Orders**. Since then, however, I've never been able to access **TRX-Enter Orders**, getting the aforementioned error. To reiterate, it only happens with my PC. When the O/E screen is a nano-second away from displaying, the error occurs. Compiler problem?
===============
Option Explicit
Public sShipDate As String
Public begShipDate As String
Private Sub DiscPct1_GotFocus()
'Create ERS Objects & other variables
Dim rsIMINVLOC As ERSRecSet
Dim rsIMITMIDX As ERSRecSet
Dim rsEDCTPFL As ERSRecSet
Dim rsEDCITMFL As ERSRecSet
Dim sqlText As String
Dim custVar As String
Dim FoundDup As Integer
Set rsIMINVLOC = New ERSRecSet
Set rsIMITMIDX = New ERSRecSet
Set rsEDCTPFL = New ERSRecSet
Set rsEDCITMFL = New ERSRecSet
Dim rs_Path As String
'Set Macola Path & Connection Strings
rs_Path = "DB=" & macForm.ConnInfo.BtrPath
rsIMINVLOC.ConnectString = "DRIVER={Macola 32-BIT Btrieve (*.dta)}; DFE=BTR;AS=4096;" & rs_Path
rsIMITMIDX.ConnectString = "DRIVER={Macola 32-BIT Btrieve (*.dta)}; DFE=BTR;AS=4096;" & rs_Path
'Determine if Item is set to non-active
rsIMITMIDX.Open ("Select Item_No, Activity_Cd from IMITMIDX_SQL where IMITMIDX_SQL.Item_No = '" & macForm.ItemNo.Text & "'"

If rsIMITMIDX.Columns("Activity_Cd"

.Value = "O" Then
IsItemObsolete = True
Else
IsItemObsolete = False
End If
'Determine QtyAvailable if Obsolete
QtyAvailable = 0
If IsItemObsolete = True Then
rsIMINVLOC.Open ("Select Item_No, Qty_On_Hand,Qty_Allocated, Qty_On_Ord from IMINVLOC_SQL where IMINVLOC_SQL.Item_No = '" & macForm.ItemNo.Text & "' and IMINVLOC_sql.Loc = '" & macForm.Loc.Text & "'"

QtyAvailable = rsIMINVLOC.Columns("Qty_On_Hand"

.Value
If Get_Use_Allocated = True Then
QtyAvailable = QtyAvailable - rsIMINVLOC.Columns("Qty_Allocated"

.Value
End If
If Get_Use_On_Order = True Then
QtyAvailable = QtyAvailable + rsIMINVLOC.Columns("Qty_On_Ord"

.Value
End If
'Determine if QtyAvailabe > 0 and allow to continue
If QtyAvailable <= 0 Then
MsgBox "You can not order this item. It has an availablity of zero at this location.", vbCritical + vbOKOnly, macForm.Company
macForm.Cancel
End If
End If
' See if Customer is an EDI Trading Partner
' First make sure item is not a misc. charge
If Mid(macForm.ItemNo.Text, 1, 2) = "**" Then
Else
rsEDCTPFL.ConnectString = "DRIVER={Macola 32-BIT Btrieve (*.dta)}; DFE=BTR;AS=4096;" & rs_Path
FoundDup = 0
sqlText = "Select ECTP_MAC_CUS_NUM from EDCTP_FL_SQL where EDCTP_FL_SQL.ECTP_MAC_CUS_NUM = '" & macForm.CustNo.Text & "'"
With rsEDCTPFL
.Open sqlText
While Not .EOF
custVar = rsEDCTPFL.Columns("ECTP_MAC_CUS_NUM"

.Value
.MoveNext
Wend
If .RowCount > 0 Then
FoundDup = FoundDup + 1
End If
.Close
End With
If FoundDup > 0 Then
FoundDup = 0
rsEDCITMFL.ConnectString = "DRIVER={Macola 32-BIT Btrieve (*.dta)}; DFE=BTR;AS=4096;" & rs_Path
sqlText = "SELECT DISTINCT ECIM_NUM, ECIM_CUS_NUM, ECIM_MAC_ITEM_NUM, ECIM_UPC_NUM FROM EDCITMFL_SQL WHERE (ECIM_CUS_NUM = '" & custVar & "') AND (ECIM_MAC_ITEM_NUM = '" & macForm.ItemNo.Text & "')"
custVar = ""
With rsEDCITMFL
.Open sqlText
While Not .EOF
custVar = rsEDCITMFL.Columns("ECIM_UPC_NUM"

.Value
.MoveNext
Wend
If .RowCount > 0 Then
FoundDup = FoundDup + 1
End If
.Close
End With
If FoundDup > 0 Then
If custVar > " " Then
Else
UserForm1.Caption = "EDI Cross Reference WARNING!!!"
UserForm1.Label1.Caption = "No UPC Number in EDI Cross reference for item " & macForm.ItemNo.Text
UserForm1.show
End If
Else
UserForm1.Caption = "EDI Cross Reference WARNING!!!"
UserForm1.Label1.Caption = "Item " & macForm.ItemNo.Text & " is not in EDI Cross Refence !!!"
UserForm1.show
End If
End If
End If
'Clean Up
rsIMITMIDX.Close
rsIMINVLOC.Close
rsEDCTPFL.Close
rsEDCITMFL.Close
Set rsEDCTPFL = Nothing
Set rsIMITMIDX = Nothing
Set rsIMINVLOC = Nothing
Set rsEDCITMFL = Nothing
End Sub
Private Sub ItemNo_GotFocus()
IsItemObsolete = False
QtyAvailable = 0
End Sub
Private Sub OECash_GotFocus()
'Declare Variables
Dim sSql As String
Dim Count As Integer
Dim rspath As String
Dim MsgAns As Integer
Dim rsOEORDLIN As ERSRecSet
Set rsOEORDLIN = New ERSRecSet
Dim sDate As String
Dim MacDate As Double
'Convert Screen Order Date to Macola format YYYYMMDD
If macForm.ShipDate.Text = "A.S.A.P." Then
sDate = macForm.Date1.Text
Else
sDate = Year(macForm.ShipDate.Text) & Right("00" & Month(macForm.ShipDate.Text), 2) & Right("00" & Day(macForm.ShipDate.Text), 2)
MacDate = sDate
End If
'Set Macola Path
rspath = "DB=" & macForm.ConnInfo.BtrPath
rsOEORDLIN.ConnectString = "DRIVER={Macola 32-BIT Btrieve (*.dta)}; DFE=BTR;AS=4096;" & rspath
'Check to see line items exist to modify date, set line dates = to date on header page
sSql = "select ord_no from OEORDLIN_SQL where Ord_No = '" & Right("00000000000000" & OE0101.macForm.No.Text, 8) & "'"
rsOEORDLIN.Open (sSql)
If begShipDate <> sShipDate Then
If rsOEORDLIN.RowCount > 0 Then
MsgAns = MsgBox("Change All Line Item Dates to Ship Date?", vbYesNo, "Date Change"

If MsgAns = 6 Then
sSql = "UPDATE OEORDLIN_SQL SET request_dt = " & MacDate & " , promise_dt = " & MacDate & " , req_ship_dt = " & MacDate & " WHERE Ord_No = '" & Right("00000000000000" & OE0101.macForm.No.Text, 8) & "'"
rsOEORDLIN.Open (sSql)
MsgBox "Date Change Complete!", vbOKOnly
End If
End If
End If
'Close connection
rsOEORDLIN.Close
Set rsOEORDLIN = Nothing
End Sub
Private Sub Qty_LoseFocus(AllowLoseFocus As Boolean)
Dim rsIMITMIDX As ERSRecSet
Dim rs_Path As String
Dim FoundDup As Integer
Dim sqlText As String
Dim pRatio As Double
Set rsIMITMIDX = New ERSRecSet
pRatio = 0
'Set Macola Path & Connection Strings
rs_Path = "DB=" & macForm.ConnInfo.BtrPath
rsIMITMIDX.ConnectString = "DRIVER={Macola 32-BIT Btrieve (*.dta)}; DFE=BTR;AS=4096;" & rs_Path
'rsIMITMIDX.Open ("Select Item_No, Activity_Cd, Price_Ratio from IMITMIDX_SQL where IMITMIDX_SQL.Item_No = '" & macForm.ItemNo.Text & "'"
FoundDup = 0
sqlText = "Select Item_No, Activity_Cd, Price_Ratio from IMITMIDX_SQL where IMITMIDX_SQL.Item_No = '" & macForm.ItemNo.Text & "'"
pRatio = 0
With rsIMITMIDX
.Open sqlText
While Not .EOF
pRatio = rsIMITMIDX.Columns("Price_Ratio"

.Value
.MoveNext
Wend
If .RowCount > 0 Then
FoundDup = FoundDup + 1
End If
.Close
End With
If FoundDup > 0 Then
UserForm1.Label1.Caption = "Price Ratio is: " & pRatio & ". If the quantity you entered was eaches, the correct entry would be: " & Round(Qty.Text / pRatio, 2)
UserForm1.show
End If
rsIMITMIDX.Close
Set rsIMITMIDX = Nothing
If Get_Check_On_Ordered = True And IsItemObsolete = True Then
If CDbl(Qty.Text) > QtyAvailable Then
MsgBox "Qty Available for this item is only: " & QtyAvailable & Chr(13) & "Please order this amount or less."
macForm.Qty.Text = "0.00"
SendKeys ("+({END})"

AllowLoseFocus = False
End If
End If
End Sub
Private Sub Qty1_LoseFocus(AllowLoseFocus As Boolean)
If Get_Check_On_Ordered = False And IsItemObsolete = True Then
If CDbl(Qty.Text) > QtyAvailable Then
MsgBox "Qty Available for this item is only: " & QtyAvailable & Chr(13) & "Please order this amount or less."
macForm.Qty.Text = "0.00"
SendKeys ("+({END})"

AllowLoseFocus = False
End If
End If
End Sub
Private Sub ShipDate_GotFocus()
begShipDate = macForm.ShipDate.Text
End Sub
Private Sub ShipDate_LoseFocus(AllowLoseFocus As Boolean)
sShipDate = macForm.ShipDate.Text
End Sub