• WSlmo23111

    WSlmo23111

    @wslmo23111

    Viewing 15 replies - 46 through 60 (of 115 total)
    Author
    Replies
    • in reply to: Run-time error 3075 (Access 2000) #948133

      Back again! Seem to be running into one little problem. If I try to change update/change only the manager field for an associate, I get a run-time error…unless I put in an InactiveDt. I can then update the records and go back remove the InactiveDt and update again. Any ideas why this is happening? The db is now in Access 97 format.

      Thanks

    • in reply to: Run-time error 3075 (Access 2000) #948085

      Thanks again! It works beautifully, and with that I am calling it a night. I really appreciate all of the help that you give me.

      nite doze

    • in reply to: Run-time error 3075 (Access 2000) #948082

      Hans,

      Can that same If IsNull stmt be inserted in the code corrected code that you originally gave me?

      Case “&Update”
      sSQL = “UPDATE tblAssociateList ” & _
      “SET username = ‘” & Me.txtOperator.Value & “‘, ” & _
      “Manager='” & Me.cboManager.Value & “‘, ” & _
      “AssocType='” & Me.cboAssocType.Value & “‘, ” & _
      “ShiftHrs=” & Me.txtShiftHours.Value & “, ” & _
      “ActiveDt=#” & Me.txtActiveDt.Value & “#, ” & _
      “InActiveDt=#” & Me.txtInactiveDt.Value & “# ” & _
      “WHERE username = ‘” & Me.lstOperators & “‘”

    • in reply to: Run-time error 3075 (Access 2000) #948073

      Had to fix those typos again. It is working correctly now. How much modification is needed to leave the InactiveDT field blank? the reason that I ask is because I have another simular form that has this same type of field (see code below) and this same field can remain blank and not cause any errors.

      Select Case Me.cmdAction.Caption
      Case “&Add”
      sSQL = “INSERT INTO tblUserLog (UserID, UserName, NmFirst, NmLast, ActiveDt, AccessLevel, Password) VALUES (”
      sSQL = sSQL & Me.txtUserID & “, ‘”
      sSQL = sSQL & Me.txtUsername & “‘, ‘”
      sSQL = sSQL & Me.txtFirstName & “‘, ‘”
      sSQL = sSQL & Me.txtLastName & “‘, ‘”
      sSQL = sSQL & Me.txtActiveDate & “‘, ”
      sSQL = sSQL & Me.cboAccessLevel & “, ‘howitzer1’)”
      Case “&Update”
      sSQL = “UPDATE tblUserLog SET username = ‘” & Me.txtUsername & “‘, ”
      sSQL = sSQL & “NmFirst = ‘” & Me.txtFirstName & “‘, ”
      sSQL = sSQL & “NmLast = ‘” & Me.txtLastName & “‘, ”
      sSQL = sSQL & “InActiveDt = ‘” & Me.txtInactiveDate & “‘, ”
      sSQL = sSQL & “AccessLevel = ” & Me.cboAccessLevel
      sSQL = sSQL & ” WHERE UserID = ” & Me.lstUsers
      End Select

      thanks!

    • in reply to: Run-time error 3075 (Access 2000) #948069

      Hans,

      I am getting a Compile error, Method or data member not found. It seems to be hanging up on Me.txtShiftHours. Any ideas?

      “VALUES (‘” & Me.txtOperator & “‘, ‘” & Me.cboManager & “‘, ‘” & Me.cboAssocType & _
      “‘, ” & Me.txtShiftHours & “, #” & Me.txtActvieDt & “#, #” & Me.txtInactiveDt & “#)”

      Thanks for finding that typo

    • in reply to: Workday (Excel 2000) #947226

      Fabulous!!!! Thanks for letting me pick those brains

    • in reply to: Workday (Excel 2000) #947213

      Hopefully this will be my last post of the day bingo

      I am using the curent formulas to determine the the BOM(Beginning of the month) =WORKDAY(EOMONTH(RDate,-1)+1,-1)
      , and EOM(End of Month) =WORKDAY(EOMONTH(RDate,0)+1,-2)

      This worked great until “RDate” became 04/29/05, which would be the first funding day of the next month. Is there a way to modify the formulas so that they will look at “RDate” and then calculate what the beginning and end of month would be?

      Marie

    • in reply to: AVERAGE(IF Formula (Excel 2000) #947206

      That was the ticket!

      Thanks again!!!

    • in reply to: AVERAGE(IF Formula (Excel 2000) #947201

      Just the average (not including *FDIM) should come to 54, and I am getting 36? Do you think that this has something to do with the blank cells?

    • Perfect! Thanks again!

    • in reply to: Workday (Excel 2000) #944482

      You are good!!! clapping

      Thanks again!!

    • in reply to: Workday (Excel 2000) #944474

      Sorry Hans!

      It is K1 crazy

    • in reply to: Workday (Excel 2000) #944465

      Hans,

      Thanks so much for the help with this. Wondering if you could help with another calculation. I have in Cell I1, a calculation to provide me with a QTD total:

      =IF(MONTH(Date)>=10,DATE(YEAR(Date),10,1),IF(MONTH(Date)>=7,DATE(YEAR(Date),7,1),IF(MONTH(Date)>=4,DATE(YEAR(Date),4,1),DATE(YEAR(Date),1,1))))

      This worked well until I found out that funding days do not include the last working day of the current month, but do include the last working day of the previous month.

      Is there a way that this QTD calculation can be modified to work in this manner?

      Thanks again for any assistance that you can provide.

      Marie

    • in reply to: date functions available in Access (Access 2003) #940622

      Ok, I have had some time to think about this. I had taken a some code from another post to help calculate workdays. When I looked at it for the one hundredth time, I finally saw were the code rounded down days to the previous workday instead of up to the next workday. I have made the modifecation and it works like it should. Modified code:

      Public Function GetNextWorkday(ByVal StartDate As Date, _
      ByVal lngInterval As Long) As Date

      Dim lngWeeks As Long
      Dim lngDays As Long

      If lngInterval = 0 Then
      GetNextWorkday = StartDate
      ElseIf lngInterval > 0 Then
      ‘ Make sure StartDate is a workday (round up):
      If Weekday(StartDate) = vbSunday Then
      StartDate = StartDate + 1
      ElseIf Weekday(StartDate) = vbSaturday Then
      StartDate = StartDate + 2
      End If

      ‘ Calculate lngWeeks and lngDays:
      lngWeeks = lngInterval 5 ‘ Integer division operator
      lngDays = lngInterval – (lngWeeks * 5) ‘ remainder
      StartDate = StartDate + (lngWeeks * 7)
      ‘ Account for weekends:
      If (DatePart(“w”, StartDate) + lngDays) > 6 Then
      StartDate = StartDate + lngDays + 2
      Else
      StartDate = StartDate + lngDays
      End If

      Else ‘ lngInterval < 0
      lngInterval = lngInterval * -1 ' Make positive & subtract later
      ' Make sure StartDate is a workday (round up):
      If Weekday(StartDate) = vbSunday Then
      StartDate = StartDate + 1
      ElseIf Weekday(StartDate) = vbSaturday Then
      StartDate = StartDate + 2
      End If

      lngWeeks = lngInterval 5
      lngDays = lngInterval – (lngWeeks * 5)
      StartDate = StartDate – (lngWeeks * 7)

      If (DatePart("w", StartDate) – lngDays) < 2 Then
      StartDate = StartDate – lngDays – 2
      Else
      StartDate = StartDate – lngDays
      End If
      End If

      GetNextWorkday = StartDate

      End Function

    • in reply to: date functions available in Access (Access 2003) #940616

      Hans,

      I have looked over the functions in the link that you provided, and do not see a specific one that would fit my need.

    Viewing 15 replies - 46 through 60 (of 115 total)