Link to home
Start Free TrialLog in
Avatar of Poop Holy
Poop Holy

asked on

Anyone can help me perfect this function?

Derived from Here
Anyone can help me perfect the Y?

Dim Y As Integer
Dim M As Date
Y = 2018
M = #4/22/ &Y#

Me.txtbox1 = DLookup("[dNum]", "tblDate", "[NewDate] = #" & format(M,"YYYY-MM-DD") & "# and [Ename] = '" & [Ename] & "'")
Me.txtbox2 = Weekday(M)

txtbox1 should show the value of dNum .
txtbox2 should show 1 since 4/22/2018 is a sunday.
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It would seem to me that "Me.texbox1= " should should provide the value for (M)

Biggles1
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
solutions provided