D
Dennis
Hi,
I'm running Access XP on Windows 7.
I have a screen where I have to have potentially repetative information for
each entry. One such field is vendor invoice number. I have the code to
track the last invoice number entere. Now, I would like to be able to enter
an "L" (for last) as the first character, hit enter, and have the software
set the current invoice number ot the the last entered invoice numbered
entered (or whatever field).
I'm currently doing this in the control's BeforeUpdate event. Apparantly,
this is the wrong way to do this.
Note: The control txtInvoiceNo is bound to the data field InvoiceNo.
Here is my code in the control's BeforeUpdate event:
If IsNull(Me.txtInvoiceNo) Then Me.txtInvoiceNo = ""
strInvNo = UCase(Me.txtInvoiceNo)
If strInvNo = "L" Then Me.txtInvoiceNo = pstrLastInvNo
What is the correct or "best" way to do this?
By the way, pstrLastInvNo is set to me.txtInvoiceNo in the
txtInvoiceNo_AfterUpdate event.
Thanks for your assitance.
Dennis
I'm running Access XP on Windows 7.
I have a screen where I have to have potentially repetative information for
each entry. One such field is vendor invoice number. I have the code to
track the last invoice number entere. Now, I would like to be able to enter
an "L" (for last) as the first character, hit enter, and have the software
set the current invoice number ot the the last entered invoice numbered
entered (or whatever field).
I'm currently doing this in the control's BeforeUpdate event. Apparantly,
this is the wrong way to do this.
Note: The control txtInvoiceNo is bound to the data field InvoiceNo.
Here is my code in the control's BeforeUpdate event:
If IsNull(Me.txtInvoiceNo) Then Me.txtInvoiceNo = ""
strInvNo = UCase(Me.txtInvoiceNo)
If strInvNo = "L" Then Me.txtInvoiceNo = pstrLastInvNo
What is the correct or "best" way to do this?
By the way, pstrLastInvNo is set to me.txtInvoiceNo in the
txtInvoiceNo_AfterUpdate event.
Thanks for your assitance.
Dennis