stock change for contract parts or for consumables (1 Viewer)

rainbows

Registered User.
Local time
Today, 02:45
Joined
Apr 21, 2017
Messages
425
i am struggling to think how to do this

the screen below shows a contract part arriving at the goods inwards then the stores man fills in the date the parts arrive , the qty received and the GRN number the inspector then has to complete the date parts inspected and if passed or not the stock change tick box then becomes active when the passed filed has something in it then it changes the stock and then the tickbox is locked

yesterday i discoverd i have a problem in as much if i but SOAP , TOWELS ETC that dont need to be inspected how can i tick another tick box or try and use the same one that dont need the inspectors input

i cannot just say if the GRN is not null change the stock because that could happen on a contract part

the second screen shows me trying to create another tickbox called stockchangecons but thats the bit thats the problem if i complete the feilds data arrived qty received and GRN that tickbox could be pressed by mistake and it changes the stock but it was supposed to go thro the inspector

the code below makes the first screen work ok

thanks steve

1690616466023.png



1690617445783.png

Code:
Private Sub Form_Current()
Me.stock_changed.Enabled = False
'Me.Passed.Enabled = False
Select Case Me.Passed

Case "yes", "short"

Me.stock_changed.Enabled = True
End Select

Me.AllowEdits = (Nz(Me.[stock_changed], False) = False)



End Sub
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:45
Joined
Sep 21, 2011
Messages
14,301
Have a flag in a table that indicates whether an inspection is required or not. If not lock/hide the inspector's input controls?
 

rainbows

Registered User.
Local time
Today, 02:45
Joined
Apr 21, 2017
Messages
425
1690699336463.png



i am struggling with the code for this and you will laugh :)at what i have been playing with when you see it but at least i am trying the code i started with is in post 1

but what i would like to do is .

both stockchangecons and stockchange are locked
if consumable is true unlock stockchanecons then when i have ticked it lock it back up again and stockchange always stays locked. no matter what i do

if consumable is not true only open up the tick box stockchange when i have put yes in the passed field then lock it back down again


the passed feild in this form is locked it get completed in another form called incoming inspection

thanks steve

Code:
Private Sub Form_Current()
Me.stock_changed.Enabled = False
Me.stockchanedcons.Enabled = False

If Me.consumable = True Then


Me.stockchanedcons.Enabled = True


Else

If Me.stockchanedcons = True Then

Me.stockchanedcons.Enabled = False


'Me.stock_changed.Enabled = True

'End If


'Me.Passed.Enabled = False

'Me.stock_changed.Enabled = False
'Me.Passed.Enabled = False
Select Case Me.Passed

Case "yes", "short", "part rejected"

Me.stock_changed.Enabled = True
End Select



Me.AllowEdits = (Nz(Me.[stockchanedcons], False) = False)

Me.AllowEdits = (Nz(Me.[stock_changed], False) = False)

End If











'Select Case Me.Passed


'Case "yes", "short"



'Me.stock_changed.Enabled = True

'End Select

'Me.stock_changed.Enabled = False

'Me.AllowEdits = (Nz(Me.[stock_changed], False) = False)

'Me.stockchanedcons.Enabled = False



'Select Case Me.consumable


'Case Is = True
'Me.stockchanedcons.Enabled = True
'End Select
'Me.stock_changed.Enabled = False

'Me.AllowEdits = (Nz(Me.[stockchanedcons], False) = False)
'Me.stock_changed.Enabled = False
'Me.Passed.Enabled = False
'Select Case Me.Passed

'Case "yes", "short", "part rejected"

'Me.stock_changed.Enabled = True
'End Select




'Me.AllowEdits = (Nz(Me.[stock_changed], False) = False)
'End Sub
End If

End Sub
 

Cotswold

Active member
Local time
Today, 10:45
Joined
Dec 31, 2020
Messages
528
Can you not have a GRN applicable to all of this type of goods received?
Say 1001, or X0011, or whatever and the inspection can be completed and the box ticked. Then depending upon what you want the system can filter GRNs with GRN = X0011 or GRM <> X0011
 

rainbows

Registered User.
Local time
Today, 02:45
Joined
Apr 21, 2017
Messages
425
the GRN does not matter for this part i am trying to do , its just a matter of it going throu inspection or not . so all consumables dont need to go throu the inspector all others do so depending on which way it goes i want the other tick boxes locked then when ticked then that lock also

this work is only in my test database until i have it correct then will copy it to the live database

steve
 

jdraw

Super Moderator
Staff member
Local time
Today, 05:45
Joined
Jan 23, 2006
Messages
15,379
It would be helpful if we could see your tables and relationships with all fields showing.
How do you identify a Consumable from nonConsumable?
Is it a business rule that only nonConsumables need to be inspected?
If so, then if a part/item is a nonconsumable, ignore/bypass your inspection processing.
If not, then what exactly determines which part/items require inspection? The answer to this should guide your processing logic.
 

rainbows

Registered User.
Local time
Today, 02:45
Joined
Apr 21, 2017
Messages
425
Code:
Private Sub Form_Current()
Me.stock_changed.Enabled = False
Me.stockchanedcons.Enabled = False


Select Case Me.Passed

Case "yes", "short", "part rejected"


Me.stock_changed.Enabled = True
End Select


Me.AllowEdits = (Nz(Me.[stock_changed], False) = False)


If Me.consumable = True Then
Me.stockchanedcons.Enabled = True
Me.stock_changed.Enabled = False
Me.AllowEdits = (Nz(Me.[stockchanedcons], False) = False)


End If
End Sub


this code now works in my test database , i created a field in my stocklist called " Consumable" and called it up like below in my form query


1690721260138.png

1690721302779.png

now i have tried to put that into my live database but it wont work the subform is not showing the linking


1690721544091.png

1690723496958.png

yet when i change the record source back like below all is ok
but i dont have the field called " consumable

any ideas please

1690723821572.png
 

jdraw

Super Moderator
Staff member
Local time
Today, 05:45
Joined
Jan 23, 2006
Messages
15,379
rainbows,
Do you have answers for the questions posed in #6?
 

rainbows

Registered User.
Local time
Today, 02:45
Joined
Apr 21, 2017
Messages
425
i was only asked to try and bypass consumables yersterday so just trying to develope it now

"How do you identify a Consumable from nonConsumable? "

enginnering will put all items into the stocklist table that are product related
purchasing will out all items that are not product related

"is it a business rule that only nonConsumables need to be inspected?"

yes

"If so, then if a part/item is a nonconsumable, ignore/bypass your inspection processing."

yes

i have added the consumable field into the bottom stocklist subform

1690732420405.png



1690731653396.png



1690732527639.png
 

jdraw

Super Moderator
Staff member
Local time
Today, 05:45
Joined
Jan 23, 2006
Messages
15,379
I would think consumable or not would be in a Table ( probably part/item).
 

Users who are viewing this thread

Top Bottom