Recent content by detrie

  1. D

    Update two fields on Subform

    I'm trying to update two fields (NewJF and NewDe) of all records in a subform based on two comboboxes (cmbSenior and cmbDe) Works fine with one field but I cant seem to get the syntax right for the second one. Private Sub UPdate_Click() Dim rst As DAO.Recordset Set rst =...
  2. D

    Insert vales from 2 multiselect listbox into a table

    That thread already had indication. Should every post include indication?
  3. D

    Insert vales from 2 multiselect listbox into a table

    I'm sorry to be so thick. Ok, I think there is still something wrong with my loop. This returns only returns the last item selection of each list Dim i As Variant Dim x As Variant Dim ParkValue As String, ConceptValue As String Dim sqlApprove As String With...
  4. D

    Insert vales from 2 multiselect listbox into a table

    (Updated Example attached) I think I'm getting close but I'm not there yet. If I select 4 values in each of the listboxes, I expect to have 12 new records in my table. This will create 12 records that are empty except for the autonumber. If I comment out the sql statement the Debug statement...
  5. D

    Insert vales from 2 multiselect listbox into a table

    Hi Paul, Thanks for your response. I modified the code as follows but it only tries to insert one record and that record is empty except for the Autonumber. Dim i As Variant Dim x As Variant Dim sqlApprove As String For Each i In Me.ConceptList.ItemsSelected i =...
  6. D

    Insert vales from 2 multiselect listbox into a table

    Yes.. Exactly. 4 records would be created. All combinations
  7. D

    Insert vales from 2 multiselect listbox into a table

    The attached samples is is a modified version of what i found here. I need to create new records into TblFinal that will will include IDs from selections in both listboxes for everything selected If I select "Park 1", Park 3, Concept 1 tblFinal will have 2 new records FinalID= 1 ParkID= 1...
  8. D

    Runtime error on query converted to VBA

    Ah.. Thanks. I didn't know that Works great
  9. D

    Runtime error on query converted to VBA

    I can run this without a problem as a query SELECT tbl_SampleType.SampleTypeID, tbl_SampleType.SampleTypeCode, tbl_SampleType.SampleTypeName, tbl_SampleType.SampleTypeInactive FROM tbl_SampleType WHERE (((tbl_SampleType.SampleTypeInactive)=False) AND ((tbl_SampleType.LoginType) Like "*" &...
  10. D

    Multi Select Option Group alternative

    I [think] I know option groups cannot be multi-select. I need a way to select 1 to 10 values from another table My plan is to use a multi-select listbox with the Record Source pointing to the other table and concatenating those record IDs into a bound field on my form. So a record on my form...
  11. D

    Compile error Type mismatch

    Paul and Mark. Thank you for your help with this. Because of the Debug.Print statement, I was able to see that I was trying to match the LEFT 6 of the form value against the entire 10 character of the table value instead of the LEFT 6. Thank you again for your help and suggestions Here is the...
  12. D

    Compile error Type mismatch

    Thanks Paul, Do you see anything in my now concatenated form reference that is preventing the LEFT 6 function from working?
  13. D

    Compile error Type mismatch

    Ok I would have never found that. Thanks Paul Things seem to run on one record but I get a Run-Time error: '3021': no current record here intDailyCount = rs!CountOfGroupID If I comment out 'Set rs = Nothing it will run on all records. Is it required? I need to revisit the SQL. It only works...
  14. D

    Compile error Type mismatch

    Ok.. that makes sense. CountofGoupID doesn't need to exist on form does it? (easy to add if it does) Also I think my syntax is still off. I am getting a Run-Time error '3061': Too few parameters. Expected 1 on set rs Set rs = db.OpenRecordset(sqlRoot)
  15. D

    Compile error Type mismatch

    I am trying to count the occurrences of the LEFT 6 characters on my form field. This code throws a "Compile Error: Type mismatch" on intDailyCount =rs I cant seem to figure it out Private Sub Command79_Click() Dim db As DAO.Database Dim rs As DAO.Recordset Dim intDailyCount As Integer Dim...
Back
Top Bottom