Recent content by BryanT

  1. B

    How can I calculate datediff between 2 records?

    Hello ccIces You could do all of the processing using a recordset and vba instead of in a query, then pass the required variables to your update query. Bryan
  2. B

    Help with date in query

    Try something like WHERE DateDiff("d",Date(),[tablename].[Renewal Date])>=0 AND DateDiff("d",Date(),[tablename].[Renewal Date)<91 Bryan
  3. B

    Trouble with INSERT INTO

    Hello csprop It looks like you are currently trying to insert the values "[TenantID].Value" etc. Not the Value contained in those items. You need to concatenate thos items into the string with quotes as appropriate Try SQL = "INSERT INTO Transactions (TenantID, Date, Amount, Category, Notes) "...
  4. B

    Extraction of first 3 characters

    Hello goldmedallist Try Select Left(YourFieldName,3) From YourTableName Bryan
  5. B

    SQL Server - Passing Parameters

    Hello stubailey007 Set the command text of an ADODB.Command object to - "exec YourProcedureName'" & Parameter1 & "','" & Parameter2 & "'" then execute the command I hope this helps
  6. B

    Unlinking tables in code

    I need to do the unlinking of tables in code and I am looking at doing this by deleting the applicable tabledefs for the linked tables. Is this the best way to go about doing it, or can anyone make suggestions on alternate ways? Bryan
  7. B

    Parameter based queries

    Hello Nick SR Parameters can be passed to queries by referencing the control on a form that holds the value required- "FORMS!YourFormName!YourControlName" The contol could be a combobox, textbox or the like. Bryan
  8. B

    Count Status

    Hello jegesmaci I would say that you may need to initialise the value in Me![Status] between calculations. Bryan
  9. B

    Force carriage return in string

    "My string " & chr(13) & "my next string"
  10. B

    Need help with a query

    Glad to be of some help. Bryan
  11. B

    VBA: Is it possible to check for a duplicate entry in a table before insert?

    Hello Argonak Do a DCount (you could also do a DLookup) on the PK value to be inserted first, if this returns 0 then the value doesn't exist. IF (DCount(newKeyCode,wire_csTBL )=0) then "Run your insert statement" Else "Do something else" END IF Bryan
  12. B

    Report Drop Down Lists

    Have the user set all selection criteria for the report on a form. Selections can be made from comboboxes bound to the applicable field of the table. Then call the report from the form. The query for the report will then nned to have it's where clause referencing the form's controls such as...
  13. B

    Need help with a query

    Hello Roonaldo Try something like this in the WHERE clause of your SELECT statement WHERE ((DateDiff("d",[HireStartDate],Date())>0)AND (DateDiff("d",[HireEndDate],Date())>0)) The section "((DateDiff("d",[HireStartDate],Date())>=0)" will give you hires that started prior to or on the date you...
  14. B

    query results

    Hello motov600 Try IIf(Left[Order_No],2)Like"OF" Bryan
  15. B

    Expanding Find Record

    Hello John11 Have you thought about using a combo box to find the surname then using combobox.value in the code for the button. The combo box could have as its rowsource as something like "SELECT DISTINCT Surname From fsubListyear7". Bryan
Top Bottom