User Profile

Collapse

Profile Sidebar

Collapse
Santiagoa
Santiagoa
Last Activity: Feb 22 '07, 03:29 PM
Joined: Jan 31 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Santiagoa
    replied to Adding 5 working days to a start date
    I added the breakpoint at the point you indicated but nothing happens, the control opens the calendar and allows me to select a date which populates the Date_Received text box but does not populate the turnaround....
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    Not sure if this is what you meant? I changed the bolded line but to what you suggested but nothing happened.

    Code:
    Option Compare Database
    Option Explicit
    Dim Originator As ComboBox
    
    Private Sub Date_Assigned_AfterUpdate()
        If IsNull(Me!Date_Assigned) Then Exit Sub
        Me!Turnaround = Me!Date_Assigned + _
                        CountDays(Me!Date_Assigned, 5)
    End Sub
    ...
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    No, the breakpoint in the code is not triggered...
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    I added a break poin in the suggested line but still the turnaround is not populated after the the Date_assigned Combo box is updated using the calendar....
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    No, that was not the problem. The control was Date_Assigned is defined as a Combo Box so when the user tries to open the list the calendar opens instead and the user is able to select a date using the calendar.

    I still can get the turnaround control to pupulate when I select a date from the calendar....
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    This is how I impemented the calendar control that populates the Date_Assigned control.

    Code:
    Option Compare Database
    Option Explicit
    Dim Originator As ComboBox
    
    Private Sub Calendar6_Click()
    Originator.Value = Calendar6.Value
    Originator.SetFocus
    Calendar6.Visible = False
    Set Originator = Nothing
    End Sub

    Code:
    Private Sub Date_Assigned_MouseDown(Button As Integer,
    ...
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    Sorry, I should have mentioned the calendar control from the onset. Is it possible to achieve the same functionality using the calendar control?
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    The date_assigned control uses a calendar to assign the date. When I remove the calendar control the code works fine. How can I use the calendar and still get the code to populate the Turnaround control?...
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    The date assigned control uses a calendar to assigned the date. I added a refresh data button see if this might help....
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    Thank you very much for your help. Have a good night!...
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    I tried the code above exactly as posted but the turnaround box does not update when a date is entered in the Date_Assigned box and the form is refreshed. Thanks for your help
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    Do I need to modify the function by removing DaysToComplete?

    Sorry I am trying to tweak the code but I don't really understand what it's doing.

    here is what I have again

    Code:
    Public Function CountDays(Date_Assigned As Date, DaysToComplete As Integer) As Integer
    ' Function to count no of working days
    Dim tmpNo As Integer
    Dim tmpDate As Date
    Dim i As Integer
        tmpNo = DaysToComplete
    ...
    See more | Go to post

    Leave a comment:


  • Thank you very much!...
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    I removed NoOfDays from the task table and renamed EndDate to Turnaround...
    See more | Go to post

    Leave a comment:


  • Santiagoa
    replied to Adding 5 working days to a start date
    Thank you very much. This is exactly what I want to do. Unfurtanetly I tried it and I didn't work.

    Here is the code I am using.

    Code:
    Public Function CountDays(Date_Assigned As Date, DaysToComplete As Integer) As Integer
    ' Function to count no of working days
    Dim tmpNo As Integer
    Dim tmpDate As Date
    Dim i As Integer
        tmpNo = DaysToComplete
        tmpDate = Date_Assigned
    ...
    See more | Go to post

    Leave a comment:


  • How to format a calculated value in a Query as Currency

    I have a query with a salary column, this column is used to multiply by a percentage and creates another column with the result. I want to represent the resulting column as currency values. I need to do this in SQL if you know how to do it I will appreciate if you can share it with me. Many thanks
    See more | Go to post

  • Santiagoa
    started a topic Adding 5 working days to a start date

    Adding 5 working days to a start date

    If I set up a task table with an Date_assigned and a number of days to complete the task I calculate the end_date field by using the code below I found in this forum

    How ever when I enter the Date_assigned and update the record, nothing happens until I manually enter a value in the DaysToComplete field. I want to keep DaysToComplete Constant (5 Days) so I tried to set the attribute in the table with 5 as the default but this does...
    See more | Go to post

  • I have a similar situation, but my form has a start date and I want to use a constant number of days to complete. I tried setting the attribute daysToComplete in the table with 5 as a default but does not work. Is there any way I can get to calculate the end date without haveng to enter the DaysToComplete value manually?

    Thank you...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...