Gasman
Enthusiastic Amateur
- Local time
- Today, 13:24
- Joined
- Sep 21, 2011
- Messages
- 14,311
Well I am puzzled as to why I could not set it from the immediate window?, that is my normal get out clause if I get in that position.?
I could amend Stocklinestatus no problem from the immediate window.
Regardless the syntax is correct *IF* you have a valid value for Stockline ?
You could use the NZ() function to set it at least to something to prove this, but you need to find the reason why it is not set. Obviously should be set for wherever it is used.
Onky you are au fait with how it is meant to work?
I'd look at those errors I got as well.
I could amend Stocklinestatus no problem from the immediate window.
Regardless the syntax is correct *IF* you have a valid value for Stockline ?
You could use the NZ() function to set it at least to something to prove this, but you need to find the reason why it is not set. Obviously should be set for wherever it is used.
Onky you are au fait with how it is meant to work?
I'd look at those errors I got as well.
Code:
Private Sub IncomingGoodsID_Click()
Form_FrmSubIOHReceiving.Visible = True
Form_FrmPoGoodReceipts.SetFocus
Form_FrmPoGoodReceipts.FrmSubIOHReceiving.SetFocus
DoCmd.GoToRecord , , acNewRec
Form_FrmSubIOHReceiving.Packinglisttxt = ""
Form_FrmSubIOHReceiving.Packinglisttxt.SetFocus
Form_FrmSubIOHReceiving.ReceivePoLineBt.Visible = False
Form_FrmSubIOHReceiving.IncomingGoodsID_FK = Me.IncomingGoodsID.Value
Form_FrmSubIOHReceiving.PurchaseOrderID_FK = Me.PurchaseOrderID_FK.Value
Form_FrmSubIOHReceiving.PoQty = Me.PoQty.Value
Form_FrmSubIOHReceiving.PoCost = Me.PoCost.Value
Form_FrmSubIOHReceiving.StocklineStatus = 1
Form_FrmSubIOHReceiving.MaterialTypeID_FK = 1
[COLOR="MediumTurquoise"]'Me.IncomingGoodsID.Enabled = False[/COLOR]
End Sub
There was another similar looking block of code, but cannot find it now. :(
I'd be putting Option Explicit at the top of all your modules to ensure variables are defined and exist
Tools/Option/Require variable checking in the IDE
You will need to add that line to existing modules.
HTH