Close with a date on form

B

Bob Vance

I am trying to code my close button to add the date 1st of next month and
that works when no date is entered but how do I get the cmdClose to close
the form when there is a date entered.......Thanks Bob
Private Sub cmdClose_Click()
If IsNull(Me.tbInvoiceDate) Then
If MsgBox("Yon need a date, do you want it entered?", vbQuestion +
vbApplicationModal + vbYesNo + vbDefaultButton2, "Intellisoft") = vbYes Then

Me!tbInvoiceDate = DateSerial(Year(Date), Month(Date) + 1, 1)
 

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

Similar Threads


Top