Expand|Select|Wrap|Line Numbers
- DoCmd.OpenQuery "ForfeitVestingDateUpdateQry"
When I run the query from design mode (the red "!"), it works. When I try to run it via this method, it does not work.
The ONLY thing I can think of is that I am passing a parameter to it via a control on a subform in an if, then, else.
Expand|Select|Wrap|Line Numbers
- If([AwardTbl]![VestingDate]>Date(),[Forms]![AstProfileFrm]![AstProfileAwardFrm].[Form]![SepDateTxt],[AwardTbl]![VestingDate])
In VBA, I captured the value of SepDateTxt, and in debug mode it was correct. Also, like previously stated, it runs fine when ran manually.
Is this an issue with passing in a parameter or am I just doing something completely wrong? I cannot figure out why it won't work.
Edit: I tried the
Expand|Select|Wrap|Line Numbers
- db.Execute
I tested the validity of both of them, via
Expand|Select|Wrap|Line Numbers
- Dim EmpID As Long
- Dim SepDate As Date
- EmpID = Me.Parent!EmployeeID
- SepDate = Me!SepDateTxt