Take result which appears on a message box an append this to a field

P

PC

Hi,

This may not be possible or too involved so feel free to tell me where to go
if it is :)

I have a Field ([OpexFileRef]) in a form into which the user enters the file
reference which is written on an invoice before it is filed (Format ??/##
Where ?? is the number of the file in that folder and ## is the month).
Beside this field I have a command button which the user can click to see
what the last [OpexFileRef] was so they can enter the next number (The
number entered may not necessarily be the next number).

The code is as follows for the command botton

Private Sub Command0_Click()

Opex = DLast("[tblInvoices]![OpexFileRef]", "[tblInvoices]")
MsgBox Opex

End Sub


What I would like is:
1. For the DLast function to add 1 to the fist part of the OpexFileRef i.e.
if the last OpexFileRef is 22/09 then what is displayed on the MsgBox is
23/09
2. To have an button on the MsgBox which the user has the option to click if
they want to add this new OpexFileRef to the adjoining field.

Thanks in advance for any advice.

...pc
 

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