Hi,
I have an orders form on which my company will be placing orders we recieve. We have two real life sites where these orders are placed: Gatwick and Woking.
I created a combo box called JobLocation which has these two locations as options. As we have two sites we have two different Job Number formats: WWO-0218 for Woking and GWO-0403 for Gatwick.
I want a selection in the JobLocation Combobox to find the last Job Number used and add 1 to the end. For example.
Lets say the last Order placed had a Job Number of GWO-0403 the next time an order was placed for Gatwick GWO-0404 would automatically appear in the JobNo text box.
Ive been trying to do this for the past week everyday at work but i cant find the solution. The furthest ive got is this:
Private Sub JobLocation_AfterUpdate()
If Me.JobLocation = "Gatwick" Then
Me.JobNo = "GWO-"
Else
Me.JobNo = "WWO-"
End If
End Sub
All i need now is to get the actual numbers to appear!
Any ideas?
Cheers.
I have an orders form on which my company will be placing orders we recieve. We have two real life sites where these orders are placed: Gatwick and Woking.
I created a combo box called JobLocation which has these two locations as options. As we have two sites we have two different Job Number formats: WWO-0218 for Woking and GWO-0403 for Gatwick.
I want a selection in the JobLocation Combobox to find the last Job Number used and add 1 to the end. For example.
Lets say the last Order placed had a Job Number of GWO-0403 the next time an order was placed for Gatwick GWO-0404 would automatically appear in the JobNo text box.
Ive been trying to do this for the past week everyday at work but i cant find the solution. The furthest ive got is this:
Private Sub JobLocation_AfterUpdate()
If Me.JobLocation = "Gatwick" Then
Me.JobNo = "GWO-"
Else
Me.JobNo = "WWO-"
End If
End Sub
All i need now is to get the actual numbers to appear!
Any ideas?
Cheers.