Query Shows no Results

  • Thread starter Thread starter Joe Miley
  • Start date Start date
J

Joe Miley

I have created a form from a table of course. In one
field I have a date (LAST EPR) and the next field (EPR DUE
DATE) I have a calculation that automatically fills the
field with LAST EPR date plus 365. That calculated field
will not show up in my table nor when I write a query
using the EPR DUE DATE field will it return any results.
It basically treat the calculated as though it was blank.
How do I run a query using this field and get the results
sought after.

Thanks
Joe
 
Hi Joe,

2 suggestions, both will work, outlined below.

1) Create an afterupdate macro on your LAST EPR field that looks like so:

SetValue
[EPR DUE DATE]
[LAST EPR]+365

2) Create a function to call as needed like so:

Function AfterUpdateLAST_EPR()
On Error GoTo AfterUpdateLAST_EPR_Err

With CodeContextObject
.[EPR DUE DATE] = .[LAST EPR] + 365
End With


AfterUpdateLAST_EPR_Exit:
Exit Function

AfterUpdateLAST_EPR_Err:
MsgBox Error$
Resume AfterUpdateLAST_EPR_Exit

End Function

hth

Judi B
 
Hi Judi,

This did exactly what I wanted it to do. You're my HERO.

Thanks
Joe
-----Original Message-----
Hi Joe,

2 suggestions, both will work, outlined below.

1) Create an afterupdate macro on your LAST EPR field that looks like so:

SetValue
[EPR DUE DATE]
[LAST EPR]+365

2) Create a function to call as needed like so:

Function AfterUpdateLAST_EPR()
On Error GoTo AfterUpdateLAST_EPR_Err

With CodeContextObject
.[EPR DUE DATE] = .[LAST EPR] + 365
End With


AfterUpdateLAST_EPR_Exit:
Exit Function

AfterUpdateLAST_EPR_Err:
MsgBox Error$
Resume AfterUpdateLAST_EPR_Exit

End Function

hth

Judi B

Joe Miley said:
I have created a form from a table of course. In one
field I have a date (LAST EPR) and the next field (EPR DUE
DATE) I have a calculation that automatically fills the
field with LAST EPR date plus 365. That calculated field
will not show up in my table nor when I write a query
using the EPR DUE DATE field will it return any results.
It basically treat the calculated as though it was blank.
How do I run a query using this field and get the results
sought after.

Thanks
Joe
.
 
Back
Top