Search results

  1. M

    Looping Through Combobox Values

    I got the same error, shouldn't I also create a line like iSaudi = [Forms]![InvoiceOutputParameterDateForm]![NonSaudiProviderCkBx] Also, the isaudi is a checkbox so I used it as an integer. Ok now as I read your message again I think you were saying we will need to add something like above...
  2. M

    Looping Through Combobox Values

    I got the same error code (Run-time error '3061': Too few parameters. Expected 5.) Incase I failed to provide any data you might find useful I will try to be as detailed as possible. This is the query "InvoiceOutputDentalPracticeNameQuery" which supplies the combobox data: SELECT...
  3. M

    Looping Through Combobox Values

    Thank you Minty (and Mark)! I will start working in your suggestions and get back to you soon!
  4. M

    Looping Through Combobox Values

    Thanks for the assist Mark. I'm afraid what I was hoping would be simple has ventured into an area that is way above my head. I hate wasting everyone's time so I will take what has been suggested and just study up on it. Thanks for everyone's input and time!
  5. M

    Looping Through Combobox Values

    Its a "Too few parameters. Expected 4" error. I think it's because the output query is missing parameters now. The output query uses the combo box value as a parameter. Is there maybe a way to place the current value of the sSQL into the combo box before the output runs?
  6. M

    Looping Through Combobox Values

    Minty - if I could get your assistance that would be great. I am getting an error at this line: Set rs = db.OpenRecordset(sSQL, dbOpenDynaset, dbSeeChanges) So far this is what I have: Dim rs As DAO.Recordset Dim db As DAO.Database Dim sSQL As String Dim iRecs As Integer sSQL = "SELECT...
  7. M

    Looping Through Combobox Values

    Thanks Minty...I will play with this a bit and get back to you!
  8. M

    Looping Through Combobox Values

    Well I have these built out already. Ok, the current design is that the user opens this form. The user inputs data parameters which "query01" uses to pull office names entered into the table between those dates. The user then selects an office name from the combo box and hits a "Run" button that...
  9. M

    Looping Through Combobox Values

    I think I am following what you are stating but in case I am not don't laugh. I am self taught so I am still learning a lot what many consider basic VBA lingo. On this form there is Start and End Date parameter fields, that once filled, allow a query to be ran that fills the combo box we...
  10. M

    Looping Through Combobox Values

    Just bumping on this to see if anyone can offer some assistance. Thanks!
  11. M

    Looping Through Combobox Values

    its the same code as above Sub SubmitButton_Click() For i = 0 To DentalPracticeNameCboBx.ListCount - 1 scode = DentalPracticeNameCboBx.ItemData(i) CboBox = scode DoCmd.OutputTo acOutputReport, "ClaimsBatchOutputReport", acFormatXLS, _...
  12. M

    Looping Through Combobox Values

    Thanks for the input but that didn't help changing to list box. Unless I go in and select each name in the list the query doesn't grab the name from the list. For example, If I select the first name in the list and click the button it works only on the first name. The rest of the exports have...
  13. M

    Looping Through Combobox Values

    Ok I replaced "cboBox" for all places with actual combo box name and it started running. The problem now is that I see its outputting and changing the query name when exported to excel. The problem is that the combo box itself is a parameter for the query that's being output and the query is...
  14. M

    Looping Through Combobox Values

    Thank you for replying. I tried your code but got an "Object Required" error. It indicates the first line of the code as the error. I think I am missing something. I am a bit confused as to where exactly I should refer to combo box name within the code you provided. If you could elaborate a bit...
  15. M

    Looping Through Combobox Values

    Hello everyone, I have tried using a lot of different people's codes to complete this but I am not too familiar with looping. I have a form where once the user puts the data parameters in the combobox is populated with a list of dental office names. After the user selects the dental...
  16. M

    Calculating Total Work Hours Between Two DateTime Fields

    I can try to research a solution. I just wanted to verify that it was text. That at least gives me a starting point. Thanks Grumm!
  17. M

    Calculating Total Work Hours Between Two DateTime Fields

    Grumm - Got a quick question. Does your code turn the time result into text by chance? I only ask because I am creating a parameter query off of this query that sums the Workedhours field by RequestType 1st Query: SELECT RequestTable.RequestID, RequestTable.RequestType...
  18. M

    Calculating Total Work Hours Between Two DateTime Fields

    PERFECTION! That did the trick with no problems! You are a life saver! Thank you so much for sticking with me and helping figure it out. I now don't have to tell my boss that I can't give them what they want!
  19. M

    Calculating Total Work Hours Between Two DateTime Fields

    Ok I made the change, it seems better. I just can't figure out hour to convert it to hh:nn:ss AND sum the hours greater than 24 hours. I tried formatting your new coding and the highest total hours in the results is 23:36:00.
  20. M

    Calculating Total Work Hours Between Two DateTime Fields

    UPDATE: I figured out the cause of the error, there was bad data in the table. Someone input an 8:00 PM instead of 8:00 AM and it was making the scripting go nuts.
Back
Top Bottom