Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
(OP)
thread639-1707832: A way to limit bin creation...
In this thread the person said that you can add code to limit creation of the bins. However there is a lock on the iminvbin database when it is on this screen causing any queries to time out. Do you have a way around it. Or an example of how you got around the issue?
thanks,
In this thread the person said that you can add code to limit creation of the bins. However there is a lock on the iminvbin database when it is on this screen causing any queries to time out. Do you have a way around it. Or an example of how you got around the issue?
thanks,
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
When they come to the IMINVENT screen that shows the bin and quantity to be put in that bin.. what I was doing when they tabbed off the bin no field I did a select on iminvbin_sql where the item_no, bin_no, and location existed.. if they didn't exist I deleted from the iminvbin any bins that didn't have the userdefined field of "TEXT". But everytime they did that it would freeze for 2 minutes and then give a sql timeout error
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
The code to determine if the Bins Exist is what freezes.
Function getBins()
On Error GoTo getDescription3_Error
'**********VARIABLES***************************|
Dim rs As New ADODB.Recordset 'Recordset |
Dim strSQL As String 'SQL command |
Dim strItemNo As String ' Item number
Dim strBinNo As String 'Bin Number
Dim strLoc As String ' location
Dim foundrecord As Boolean
Dim cmd As New ADODB.Command 'Command
'**********************************************|
setConnection
getBins = False
'-----Get item number from form------
strItemNo = ItemNo.Text
strLoc = Location.Text
strBinNo = BinNo.Text
'-----Get 3rd description from database-----
strSQL = "SELECT * " & _
"FROM iminvbin_sql " & _
"WHERE item_no='" & strItemNo & "' " & _
"and loc = '" & strLoc & "' " & _
"and bin_no = '" & strBinNo & "' " & _
"and user_def_fld_1 is not null"
cmd.ActiveConnection = strConnection
cmd.CommandText = strSQL
--------------FREEZES ON THE OPEN COMMAND
rs.Open cmd
'-----If item is found, get description3-----
If rs.EOF = False Then
getBins = True
End If
rs.Close 'Close recordset
Set rs = Nothing 'Dispose of recordset
'=====ERROR TRAPPING=====
Resume_No_Errors:
Exit Function
getDescription3_Error:
MsgBox Err.Description, vbCritical, "Bin Master"
GoTo Resume_No_Errors
End Function
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
Put a watch on stSQL when you are executing the code. Paste the result into SQL Management Studio in a new query. Does it run? If not can you tell why not?
You code sets a GetBins (a boolean variable?) to True if nothing is found. Then what happens? I'm lost at that point.
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen
My code is a bit different than yours. My connection code:
CODE
The Macform code:
CODE
You may or may not already have the proper references. Post back if you have trouble.
This goes beyond what I normally do for free but I wanted to make sure this could be done.
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html
RE: Limit Creation of Bins in the Inventory Adjustment screen/im receiving screen