Search results

  1. oxicottin

    Solved Controls source is =[OpenArgs] From Form

    @MajP yes it works well and its in the reports text box that uses the Openargs from the VBA in the forms option. You wrote to use your code in the forms load event, I'm not understanding and I think maybe I didn't explain what I'm trying to do very well. I attached a copy of the DB, what I want...
  2. oxicottin

    Solved Controls source is =[OpenArgs] From Form

    Hello, I have a form with a few option buttons that use OpenArgs to change the dates in a report. If the date is a Friday #7 then highlight the textbox on the report. I tried using Weekday([OpenArgs])=7 under conditional formatting but it never changes the color. How should I approach this...
  3. oxicottin

    Solved Save listbox column (1) data as Delimited

    your Column(1, nIndex) worked, Thanks! Dim sList As String Dim nIndex As Integer For nIndex = 0 To lstCrewOneEmployeeNames.ListCount - 1 sList = sList & lstCrewOneEmployeeNames.Column(1, nIndex) & "," Next sList = Left$(sList, Len(sList) - 1) Me.txtCrewOneDelimited = sList
  4. oxicottin

    Solved Save listbox column (1) data as Delimited

    Hello, I have a listbox that shows employees names and I wanted to save the list as a Delimited list separated by comma in my textbox txtCrewOneDelimited . I can get it to work BUT I need to save what's in the second hidden column of the listbox and not the first column which is and employee ID...
  5. oxicottin

    Solved Two listboxes remove selections if used

    Dang fellas im going to have to try this when I get back from the holidays! Ill post back next week.... Thanks,
  6. oxicottin

    Solved Two listboxes remove selections if used

    Hello, I have two listboxes (CrewOneDelimitedEmployees) and (CrewTwoDelimitedEmployees) using the same employee list to select from. I want to be able to if I select data from (CrewOneDelimitedEmployees) then it should remove the selection from (CrewTwoDelimitedEmployees) so I can't select same...
  7. oxicottin

    Solved Highlight cell on print

    Yes im saving the workbook so I always have the last date used in my cell E7, Below is better looking VB? Sub Test() Dim x As Integer With Sheets("Plant Attendance") For x = 1 To 5 If x = 5 Then .Range("E7").Interior.ColorIndex =...
  8. oxicottin

    Solved Highlight cell on print

    @Gasman this works but is there a better way? Sub Test() Dim x As Integer With Sheets("Plant Attendance") For x = 1 To 5 If x = 5 Then .Range("E7").Select Selection.Interior.Color = vbRed .PrintOut...
  9. oxicottin

    Solved Highlight cell on print

    Hello, I have a Excell sheet that I use to print either 5 days or 4 days worth of copy's using a button on sheets heading. Anyways I need the VBA on the 5th print (Button Print 5 Days) which the date would be end on a Friday to highlight cell E7 for that print then change tit back to normal. How...
  10. oxicottin

    Solved No current record error

    @Gasman acually there isnt really anything on this form other than its so I can view logIn and logout times/names and I clear the table after I view them. Below is everything I have behind form. Option Compare Database Option Explicit Private Sub cmdDeleteAllRecords_Click()...
  11. oxicottin

    Solved No current record error

    It gives me an error 2105 can't go to specified record. I'm just going to use the error handling. Thanks!
  12. oxicottin

    Solved No current record error

    Hello, I have a button that clears my "Who Logged In" table, and the button works and it requerys the form BUT when I close the form, I get an error message. Why am I getting the message? Private Sub cmdDeleteAllRecords_Click() CurrentDb.Execute "Delete * From tbl_WhoLoggedIn"...
  13. oxicottin

    Solved Calculate correct shift worked

    @MajP I used your example above with your previous code and it works now.... Thanks!
  14. oxicottin

    Solved Calculate correct shift worked

    @MajP I tried your example and ran the database to collect current data from PLC and it gave me a Zero entry for my shift. However, I tried the code below and it worked, and I don't know why yours didn't? in my immed window it printed the t "DelayStart" like 09/19/2023 19:29:00 is it because I...
  15. oxicottin

    Solved Calculate correct shift worked

    @MajP does it matter if the PLC is collecting time as military time (12)? I tried changing the code to #15:50:00# and it reverts back to #3:50:00 PM#
  16. oxicottin

    Solved Calculate correct shift worked

    @CJ_London the "delaystart" is a date/time captured by a PLC i need to utilize the function in a query and throughout the code to capture the shift I'm not following what your suggesting.
  17. oxicottin

    Solved Calculate correct shift worked

    I need help with a function to calculate what shift the “DelayStart” time is on. I made this function below but I'm not sure if it's calculating the shift correctly OR if there is a better way? Shift 1 the “DelayStart” is 4:45am – 1550pm Shift 2 the “DelayStart” is 1550pm – 1:45am Shift 3 the...
  18. oxicottin

    Solved Export search form data to excel

    I got it working.... When I added the QueryDefs it was overriding my query (qry_AdvancedSearch) so I created a dummy query (qry_Dummy_AdvancedSearch) so it could build it in that instead of changing my query that the form uses to look up data. Thanks all!!!! Private Sub...
  19. oxicottin

    Solved Export search form data to excel

    Alright I think im getting somewhere... @pbaldy Im able to get a result from debug but I get a different error. RESULT: SELECT * FROM qry_AdvancedSearch WHERE [ProductID] = 36 AND [ShiftID] = 1 ERROR: Private Sub cmdExportToExcel_Click() Dim outputFileName As String Dim XL As...
  20. oxicottin

    Solved Export search form data to excel

    @pbaldy the debug result says true in the immediate window. @Gasman I also removed the "" from. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, strSQL, outputFileName, True Do you mean add something like. With CurrentDb.QueryDefs("qry_AdvancedSearch") .SQL = strSQL End...
Back
Top Bottom