T
TOM LEHMAN via AccessMonster.com
I have an inventory data base with a form where I can update
a records quantity and if it is “in stock or not in stock”
I would like to be able to change the quantity and the “in stock status”,
and also save both the new and old record. For example
current record = part no xxxx in stock qty. 10
update record to part no xxxx not in stock qty 3
I want to end up with one record part no xxxx in stock qty. 7
And one record part no xxxx not in stock qty 3
Below is the code I use to do this and it works but in does not
address the value of the qty, I end up with
one record part no xxxx in stock qty.3
one record part no xxxx not in stock qty. 3
I believe that I need to declare the value of qty as a variable but I
Don’t know how to do this.
I hope I have made this question clear
Can you help?
Thank you
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,acMenuVer70
If [INSTOCK] = "NO" Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
[INSTOCK] = "YES"
If [INSTOCK] = "YES" Then
[USEDON] = ""
End If
If [USEDON] = "" Then
[DATEOUT] = ""
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'PasteAppend
End If
Exit_SAVE_Click:
Exit Sub
Err_SAVE_Click:
MsgBox Err.Description
Resume Exit_SAVE_Click
End If
End Sub
a records quantity and if it is “in stock or not in stock”
I would like to be able to change the quantity and the “in stock status”,
and also save both the new and old record. For example
current record = part no xxxx in stock qty. 10
update record to part no xxxx not in stock qty 3
I want to end up with one record part no xxxx in stock qty. 7
And one record part no xxxx not in stock qty 3
Below is the code I use to do this and it works but in does not
address the value of the qty, I end up with
one record part no xxxx in stock qty.3
one record part no xxxx not in stock qty. 3
I believe that I need to declare the value of qty as a variable but I
Don’t know how to do this.
I hope I have made this question clear
Can you help?
Thank you
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,acMenuVer70
If [INSTOCK] = "NO" Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
[INSTOCK] = "YES"
If [INSTOCK] = "YES" Then
[USEDON] = ""
End If
If [USEDON] = "" Then
[DATEOUT] = ""
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'PasteAppend
End If
Exit_SAVE_Click:
Exit Sub
Err_SAVE_Click:
MsgBox Err.Description
Resume Exit_SAVE_Click
End If
End Sub