Change Calender Start date

B

Bob V

I want to add this to my code
If [ckb7] = -1
Me!tbDateFrom = DateSerial(Year(Date), Month(Date) - 1, 7)
Is this possible?.....Thanks for any Help............Bob

Private Sub Form_Open(Cancel As Integer)

Select Case Me.OpenArgs

Case "OwnerStatement"

Me.Caption = "Owner Statement"

tbDateFrom.value = Format("01-" & Month(Now) & "-" & Year(Now),
"dd-mmm-yyyy")
tbDateTo.value = Format(Now, "dd-mmm-yyyy")
 
J

JK

Hi Bob
|
| I want to add this to my code
| If [ckb7] = -1
| Me!tbDateFrom = DateSerial(Year(Date), Month(Date) - 1, 7)
| Is this possible?.....Thanks for any Help............Bob
|
| Private Sub Form_Open(Cancel As Integer)
|
| Select Case Me.OpenArgs
|
| Case "OwnerStatement"
|
| Me.Caption = "Owner Statement"
|
| tbDateFrom.value = Format("01-" & Month(Now) & "-" & Year(Now),
| "dd-mmm-yyyy")

This sould be Format(DateSerial(Year(Date), Month(Date), 1))


| tbDateTo.value = Format(Now, "dd-mmm-yyyy")
|
|
|
 
B

Bob V

Thanks JK
tbDateFrom.value = Format(DateSerial(Year(Date), Month(Date) - 1, 7),
"dd-mmm-yyyy")
......Regards Bob
 

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