Search results

  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

    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...
  3. 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 "*" &...
  4. 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...
  5. 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...
  6. D

    DCount or Query most efficient

    I am trying to determine if a DCount function would be more efficient than a query to return the count the items in a table. I got the SQL to work but I am struggling with the correct syntax for the DCount statement because of the joined table. I am able to get this simple function to work but...
  7. D

    Import OpenOffice Calc file to a form

    I am trying to import an OpenOffice Calc spreadsheet into an MS Access Form The code below works with an MSWord Form I've created. I could use some help converting this to work with .ods files Dim appWord As Object Dim doc As Object Dim strDocName As String Dim blnQuitWord As Boolean Dim...
  8. D

    Move parsed fields into a table

    Access 2003 I'm trying to build a command button to parse each line into a new record of my table [TBLRECORDS] I am able to parse a single line using this code but don't know how to insert the data into the table and loop through for all lines in my [memFile] control On a form I have a text...
  9. D

    Make search case insensitive

    Access 2003 Trying to filter a form based on a field with wildcard My form has a txtCustFilter control where a customer's name cane be entered in part or whole The Customer's name is in PCCustomerName This code works but, I'd like to make it case insensitive Dim strFilter As String...
  10. D

    Do not display form until fully loaded

    Access 2003 I have a rather complex form with an ODBC connection to data that takes some time to load. The Form has a continuous subform I am using in place of a listbox to select records (I need more functionality than a listbox) The Form's Record Source is a query When the form opens, I...
  11. D

    Error 3061 - Too Few parameters

    Access 2003 This statement works great. db.Execute "INSERT INTO TBLFILESTEMP (TextFile) VALUES (""" & Replace$(strDelimiter & vbNewLine & var, """", """""") & """);" I'd like to include FileID (number Long Integer) and use the value from MyForm RecordID (autonumber) This gives me a Run-Time...
  12. D

    Parse records from memo field

    Access 2003 I have a process which imports a txt file into a memo field of my TBLORIGINAL table Each file may have one record or it may have multiple records Every record begins (exactly) with For each record in the memo field, I need to create a new record into my TBLPROCESSED table This...
  13. D

    Need Leading Zeros On Form But Not On Table

    Access 2003 I have a text box control bound to a text field I need the value to look like this 00000014 (with the leading zeros) but stored without like this 14 The user may paste the entire value in or hand enter with or without the leading zeros Regardless of the input method I need 8...
  14. D

    Pass a formula form a Query to Excel

    Access 2003 Excel 2003 I have a routine that exports the results of a query to an Excel file. Is it possible to input the formula into the query so that the Excel values calculate? This is the formula I am trying to pass to the "AZ" column of the Data tab MyCalc::"IF(T2="","0",TODAY()-T2)"
  15. D

    sumproduct to sum rather than count

    Excel 2003 All This formula will count the occurrences and works great. I need to use this criteria to get the SUM of nmCapex (a named range) but am not sure how to do it =SUMPRODUCT(--(nmIOT=D5)*(nmEngageType="PC")*(--(NOT(ISNUMBER(FIND("Cancelled",nmStatus))))))
  16. D

    ActiveControl Datasheet Caption, Tag or ControlTip text

    Access 2003 I have multiple bound text controls on a form. I am using this to output the Control Names and values to a table. I am getting results like: Form Field: txtCompany Form Value: ABC Corporation rst!FormField = Screen.ActiveControl.Name rst!FormValue = Screen.ActiveControl I'd...
  17. D

    Setting A Form Variable

    I think this is a very basic question but am having trouble finding an answer. I have Dev Ashish's Drag and Drop code running great. He calls out frmDragDrop so as long as I have a form named frmDragDrop (with his events appropriately added) everything is fine. However, I'd like to run this...
  18. D

    IIF LEN throws too many arguments

    Access 2003 I am trying to derive the Quarter and two digit year from a date field Logic: If the toCSHipDate is not empty then Ship:= toCSHipDate formatted as Q3 13 (Q# yy). If toCSHipDate is empty return a blank Ship: IIf((LEN([toCSHipDate]>1, ("Q" & Format(([toCSHipDate]),"q") & " " &...
  19. D

    Continuous Form Case Formatting Odd Results

    Access 2003 I am working with two controls - tblStatusStep (integer) - ctlCustomerName (string) I am trying to get the background color of ctlCustomerName to change based on the value of tblStatusStep 0 to 10 = Yellow 11 to 20 = Orange 21 to 30 = Green 31 to 40 = Blue 41 to 50 = Violet All...
  20. D

    Run time error 3011

    I'm getting a Run-time error '3011' The Microsoft Office Access database engine could not find the object 'strMatrix'. Make sure the object exists and that you spell its name and the path name correctly. Can someone tell me what I'm missing? Dim strMatrix as String strMatrix = "SELECT ..."...
Back
Top Bottom