Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a next day date 1

Status
Not open for further replies.

matty1404

MIS
Feb 12, 2007
74
US
Is it possible to add the next days date to a report. Also when it is friday to add mondays date?
 

Matty,

Can you restate the question? I'm just not sure what you're looking for.

Please provide some data, and your desired output. Software versions are helpful, too.

Good luck!
Don

[blue]________________________________________________________
Some folks put their money where their mouth is. I just pay my bill. [/blue]
 
I actually figured it out. But, I was wondering how to automatically input the next days date in a report. We fax out a sheet and we want tomorrows date on it because thats when it will get mailed. So I was wondering how that was coded. but, I did figure it out. Thanks
 

Hi Matty,

Glad you got the solution so quickly!

Would you mind doing us TTers a favor? This is a sharing community, so we'd love to have you share your solution with us. You posted the question, and many more folks (than me) pondered the answer. You can reward them by posting your solution, since it will very likely help another member.

It's give and take.

Thanks,

doN

[blue]________________________________________________________
Some folks put their money where their mouth is. I just pay my bill. [/blue]
 
Not a problem at all. I first figured out how to put in next days date which was just now()+1. Then I figured out how to add just the day like "Friday". Then I just had day1 = friday and wrote a simple if statement. So when the string = "Friday" it skips 3 days instead of just 1. The Ship_Label.caption is refering to the text box I want this date to go in.
Heres the code.

Dim day1 As String

day1 = Format$(Now, "dddd")

If day1 = "Friday" Then
Ship_Label.Caption = Format$(Now + 3, "dddd,mmmm dd, yyyy")
Else
Ship_Label.Caption = Format$(Now + 1, "dddd,mmmm dd, yyyy")

End If
 

Generous doin's, Matty!

Have a Star!

Don

[blue]________________________________________________________
Some folks put their money where their mouth is. I just pay my bill. [/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top