Date Add Function (1 Viewer)

RACHNA

Registered User.
Local time
Today, 11:08
Joined
Nov 18, 1999
Messages
12
I'm trying to calculate a date field on a subform based on a date field on the parent form using the following expression in the control source of the subform's date field i'm trying to calculate:

( I want the field to be 10 days from the Admission Date)

=DateAdd("d",10,[Forms]![frmAdmissions]![AdmissionDate])

I keep getting this error #Name?. Any ideas?
 

eason

Registered User.
Local time
Today, 05:08
Joined
Nov 3, 1999
Messages
31
Try this in your control sorce:

=([Form]![form Admission]![Admission Date])+10

If it does not work let me know I may have another idea.


[This message has been edited by eason (edited 01-04-2000).]
 

Travis

Registered User.
Local time
Today, 03:08
Joined
Dec 17, 1999
Messages
1,332
Check to make sure that you are referencing the correct Field Name (e.g., Miss Spelling)

Also I recommend have this field use and AfterUpdate of the Date Field.

Also add change your code just slighly:

Use Me instead of [Forms].[frmAdmissions]
This will reduce chances of error and typing.
 

RACHNA

Registered User.
Local time
Today, 11:08
Joined
Nov 18, 1999
Messages
12
I've tried both of the suggestions above and i'm still not successful.

-still got #Name? (Eason)
-nothing happened (Travis)

Any other ideas?

Thanks much!
 

Travis

Registered User.
Local time
Today, 03:08
Joined
Dec 17, 1999
Messages
1,332
Are you sure that the field you are referencing is the field name? That is the only time I know of that the #Name? error should occur.
 

RACHNA

Registered User.
Local time
Today, 11:08
Joined
Nov 18, 1999
Messages
12
For some reason, the field was not recognized on the subform in my calculation. Spelling was correct.

I've added the date fields from the subform to the main form and it works fine.

I appreciate the help!
 

Users who are viewing this thread

Top Bottom