Automated Sales Order ID update

T

tr2usa

I am trying [SalesOrderID] in my [Inventory Transactions] incremantely
grow instead of user to enter the number.
I have SO form and linked to [Inventory Transactions] with [Inventory
Transactions subform]. SO TransactionID linked to TransactionID in my
[Inventory Transactions subform], but I want [SalesorderID] to be in
my [Inventory Transactions] to identify.

I wrote this VBA in BeforeUpdate but it does not work. Can you please
someone help me out?

Private Sub SalesOrderID_BeforeUpdate(Cancel As Integer)
If IsNull(Me![SalesOrderID]) Then
Me![SalesOrderID] = [Inventory transactions]![SalesOrderID] +
1
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top