Invoice Problem

wizcow

Registered User.
Local time
Today, 06:20
Joined
Sep 22, 2001
Messages
236
Hello

1. My Invoice has a subform. Set continous forms.
2. Ticket items are added to the subform.
3. One of the items is a ticket number.
4. Ticket numbers are usually in sequence.

example:

line1 would have ticket number #200
line2 would have ticket number #201
line3 would have ticket number #203 etc.


What I want to do is this:
Enter my ticket number in line1, (say #200)
but when I move to line2 I would like Acces to automaticly enter a ticket number (previous ticket number +1)
(which would be #201)


Tom
 
Hmmmm ......

If you enter the first ticket number in the subform and the format of this entry will always remain in the format you have given (#200 .... ect). Then try using the After Update event of the control in the subform.

Private Sub YourTxtboxName_AfterUpdate()
Me.YourTxtboxName.DefaultValue = Chr(34) & "#" & Mid(Me.YourTxtboxName, 2) + 1 & Chr(34)
End Sub

Change "YourTxtboxName" to the actual name of the control in the subform.

HTH
RDH
 
Thanks Ricky

You are a genius!

Tom
 

Users who are viewing this thread

Back
Top Bottom