Ad 90 Days to a Data Field in another field!!

pikroausa

Registered User.
Local time
Today, 10:54
Joined
Jan 29, 2009
Messages
12
Hi Guys!!

I have a big problem.. I have a date that I need ad 90 from that date.

Last_Discharge_Date + 90 days into Next_Visit_Date

How Can I do That?

Pleaseeee HEEEEEEEEEEEEEEELLLLLLLLPPPPPPPPP!!!:eek::eek::eek::eek::eek::eek::eek::eek::eek:

Thanks Guys!
 
assuming Last_Discharge_Date and Next_Visit_Date are of date types then this would do it:

[Next_Visit_Date] = [Last_Discharge_Date] + 90

ow are you trying to do this: is it an update in a query? a textbox on a form or in VBA?
 
Thanks for your answer!

But where I have to used? on Last_Discharge_date or on Next_Visit_Date?

Please if you can write the whole criteria, I gonna appreciated..

Thanks Again!!
 
assuming Last_Discharge_Date and Next_Visit_Date are of date types then this would do it:

[Next_Visit_Date] = [Last_Discharge_Date] + 90

ow are you trying to do this: is it an update in a query? a textbox on a form or in VBA?

Shows Blank Buddy!!!

Both are date types.... in a query (not update)

Thanks!
 
But Where?? On first field or second field in a query?

If we cannot see your query to determine what needs to be done, then all we can do is provide advice that will help you learn to do it, not do it for you, which is what they have done so far. Take time to try it on both fields and perhaps you will find what you are looking for.
 
as its just a select query, you will not update the field [Next_Visit_Date] you can only view the next visit date by using an expression in your query:
add an extra column in the query and type in:
Next Visit Date : [Last_Discharge_Date] + 90
this will display the next visit date, but not update it in your table, to do that a update query will work.
 
If we cannot see your query to determine what needs to be done, then all we can do is provide advice that will help you learn to do it, not do it for you, which is what they have done so far. Take time to try it on both fields and perhaps you will find what you are looking for.


Thank you for your answer. That happened is I'm feeling frustrating with this.
My apologies if I offended anyone. I'm just want help, because nothing works in any way. If it is any help here is a couple of pics of the query.

Thanks again!!

Angel


moz-screenshot.jpg
moz-screenshot-1.jpg
[FONT=&quot]
clip_image002.jpg


[/FONT] [FONT=&quot]
clip_image002.jpg
[/FONT]
 
as its just a select query, you will not update the field [Next_Visit_Date] you can only view the next visit date by using an expression in your query:
add an extra column in the query and type in:
Next Visit Date : [Last_Discharge_Date] + 90
this will display the next visit date, but not update it in your table, to do that a update query will work.

Thanks Husan....

They show me an error: Date type mismatch in criteria expression..


Thanks again
 
Thank you for your answer. That happened is I'm feeling frustrating with this.
My apologies if I offended anyone. I'm just want help, because nothing works in any way. If it is any help here is a couple of pics of the query.

Thanks again!!

Angel


moz-screenshot.jpg
moz-screenshot-1.jpg
[FONT=&quot]
clip_image002.jpg
[/FONT]

[FONT=&quot]
clip_image002.jpg
[/FONT]

The images are not viewable
 
sorry, i wasnt very clear, dont type
Next Visit Date : [Last_Discharge_Date] + 90
in the criteria part but in the first row,
Field:
 
sorry, i wasnt very clear, dont type
Next Visit Date : [Last_Discharge_Date] + 90
in the criteria part but in the first row,
Field:


Ok.. Let's start again...

I have Last_Discharge_Date, and I want to put into Next_Visit_Date a date 90 days from Last_Discharge_Date. I tried Dateadd on Next_Visit_Date but doesn't work. ie: DateAdd("m",3,[Next_Visit_Date])

I really don't know how to figure it out...
 
can you go into the SQL of the query design and send a copy and paste please.
 
can you go into the SQL of the query design and send a copy and paste please.


Here you go buddy!!

SELECT [Patient Info].Chart_Number, [Patient Info].Patient_LastName, [Patient Info].Patient_FirstName, [Patient Info].SSN, [Patient Info].Phone, [Patient Info].Active, [Patient Info].Last_Discharge_Date, [Patient Info].Next_Visit_Date
FROM [Patient Info]
WHERE ((([Patient Info].Last_Discharge_Date)=IIf(IsNull([Last_Discharge_Date])," ",[Last_Discharge_Date])) AND (([Patient Info].Next_Visit_Date)=DateAdd("m",3,[Next_Visit_Date])))
ORDER BY [Patient Info].Last_Discharge_Date;
 
You got the expression in the wrong part, it should be in the select not in the where, try this:

Note: this will only calculate the next date not save it.

SELECT
[Patient Info].Chart_Number,
[Patient Info].Patient_LastName,
[Patient Info].Patient_FirstName,
[Patient Info].SSN,
[Patient Info].Phone,
[Patient Info].Active,
[Patient Info].Last_Discharge_Date,
Next Visit Date:[Patient Info].Last_Discharge_Date + 90
FROM [Patient Info];
 
You got the expression in the wrong part, it should be in the select not in the where, try this:

Note: this will only calculate the next date not save it.

SELECT
[Patient Info].Chart_Number,
[Patient Info].Patient_LastName,
[Patient Info].Patient_FirstName,
[Patient Info].SSN,
[Patient Info].Phone,
[Patient Info].Active,
[Patient Info].Last_Discharge_Date,
Next Visit Date:[Patient Info].Last_Discharge_Date + 90
FROM [Patient Info];

The syntax should still be incorrect. If it is good, I apologize, since I have never seen it that way. In any event,
Change:
Next Visit Date:[Patient Info].Last_Discharge_Date + 90
To:
[Patient Info].Last_Discharge_Date + 90 As [Next Visit Date]
 

Users who are viewing this thread

Back
Top Bottom